2016-11-16 10 views
0

WordPressの投稿にコンテンツのすぐ下にタグを表示しようとしています。なぜsingleles.phpに変更が加えられた場合でも、私のフッターがサイドバーに移動しますか?

私の元のコード(ちょうど端部):

<div class="clearfix"></div>    

<div class="entry"> 
    <?php the_content(); ?> 
    <p style="text-align : center; font-size : 13px;">Views presented in the article are those of the author and not of ED.</p> 
</div> 

<div class="clearfix"></div> 

<?php endwhile; ?> 
<?php endif; ?> 

</div> 
</div> 

私の修正コード:私が何を意図したもの

<div class="clearfix"></div> 

<div class="entry"> 
    <?php the_content(); ?> 
    <p> 
     <?php $posttags=get_the_tags(); if ($posttags) { foreach($posttags as $tag) { echo $tag->name . ' '; } } ?> 
    </p> 

    <p style="text-align : center; font-size : 13px;">Views presented in the article are those of the author and not of ED.</p> 
</div> 

<div class="clearfix"></div> 

<?php endwhile; ?> 
<?php endif; ?> 

</div> 
</div> 

は、タグを作成しますコンテンツの下に表示されます。

タグが表示されません:何が起こった

。 (キャッシュを空にしても、間違っていても間違ってしまいます)。

フッターがサイドバーに移動します。

フッタがサイドバーに入るのを避けるにはどうすればよいですか?

答えて

0

あなたはあなたの構文にエラー

$posttags = get_the_tags(); 

お知らせのスペースであるべき持っている "get_the_tags();"

+0

これは質問のタイプミスです。ごめんなさい。私の実際のコードではありません。それを変える。 – Mana