2016-05-10 5 views
1

まず、これは簡単な質問は、HTML /ワードプレスとの私の最初の時間であり、これはWordPressのPHP - 画像上のハイパーリンク

は基本的に私はワードプレスのlawyeria liteのテーマをダウンロードしただけで学習運動であれば申し訳ありませんこのテーマでは、ホームページ上に3つのアイコンがあり、その下にテキストがあります。私がしたいことは、ユーザーがイメージをクリックして別のページに移動できるようにすることです。ただし、テーマのカスタマイズオプションでは不可能である。

私はこのことに関連するPHPを見つけたと思う、私の質問はどうすれば私の目的を達成するためにこれを変更できますか?

    <?php 
         if (get_theme_mod('lawyeria_lite_frontpage_firstlybox_icon',get_template_directory_uri().'/images/features-box-icon-one.png')) { 

          echo '<div class="features-box-icon">'; 


           echo '<img src="'.get_theme_mod('lawyeria_lite_frontpage_firstlybox_icon', get_template_directory_uri().'/images/features-box-icon-one.png').'" alt="'.get_theme_mod('lawyeria_lite_frontpage_firstlybox_title').'" title="'.get_theme_mod('lawyeria_lite_frontpage_firstlybox_title').'" ;/>'; 

          echo '</div>'; 
         } 

         if (get_theme_mod('lawyeria_lite_frontpage_firstlybox_title','Lorem')) { 

          echo '<h4>'; 

           echo get_theme_mod('lawyeria_lite_frontpage_firstlybox_title','Lorem'); 

          echo '</h4>'; 
         } 

         if (get_theme_mod('lawyeria_lite_frontpage_firstlybox_content','Go to Appearance - Customize, to add content.')) { 

          echo '<p>'; 

           echo get_theme_mod('lawyeria_lite_frontpage_firstlybox_content','Go to Appearance - Customize, to add content.'); 

          echo '</p>';  
         } 
        ?> 
      </div><!--/div .features-box--> 

と私はこのコード行にそれを絞られている:

       echo '<img src="'.get_theme_mod('lawyeria_lite_frontpage_secondlybox_icon',get_template_directory_uri().'/images/features-box-icon-two.png').'" alt="'.get_theme_mod('lawyeria_lite_frontpage_secondlybox_title','Ipsum').'" title="'.get_theme_mod('lawyeria_lite_frontpage_secondlybox_title','Ipsum').'" />'; 

私はhrefの

echo '< href="page.php" 'img src="'.get_theme_mod('lawyeria_lite_frontpage_secondlybox_icon',get_template_directory_uri().'/images/features-box-icon-two.png').'" alt="'.get_theme_mod('lawyeria_lite_frontpage_secondlybox_title','Ipsum').'" title="'.get_theme_mod('lawyeria_lite_frontpage_secondlybox_title','Ipsum').'" />'; 

に追加しようとしているが、これはHTTPエラー500を与えます

多くのお礼ありがとうございます

答えて

0

まあそれは私が右のトラックが、間違った形式にあったように、これは私が

echo '<a href="pageone.php"><img src="'.get_theme_mod('lawyeria_lite_frontpage_firstlybox_icon', get_template_directory_uri().'/images/features-box-icon-one.png').'" alt="'.get_theme_mod('lawyeria_lite_frontpage_firstlybox_title').'" title="'.get_theme_mod('lawyeria_lite_frontpage_firstlybox_title').'" ;/></a>'; 
を望んでいたものを達成している方法です見えます
関連する問題