WordPress、投稿タグのリンク有り無しの出力方法
リンク付き
1 | <?php the_tags(''); ?> |
リンク無し
1 2 3 4 5 6 7 8 | <?php $posttags = get_the_tags(); if ($posttags) { foreach($posttags as $tag) { echo $tag->name . ”; } } ?> |
1 | <?php the_tags(''); ?> |
1 2 3 4 5 6 7 8 | <?php $posttags = get_the_tags(); if ($posttags) { foreach($posttags as $tag) { echo $tag->name . ”; } } ?> |