Page 1 of 1
Add tag list to page footer
Posted: Wed Dec 25, 2019 5:27 pm
by susannemcom
Hi all and I hope you're enjoying your Christmas/other holiday you may celebrate.
I wonder if I could add a tag list to the end of my posts in my own theme? Where would I find the code for that?
Cheers!
Re: Add tag list to page footer
Posted: Thu Dec 26, 2019 12:52 pm
by hxii
This is what I use, for example:
Code: Select all
<?php if ( $page->tags( true ) ): ?>
<section class="article-tags">
<ul class="tags-list"><span>Tags</span>
<?php foreach($page->tags(true) as $tagKey=>$tagName) :?>
<a href="<?php echo DOMAIN_TAGS.$tagKey ?>" rel="tag"><li><?php echo $tagName ?></li></a>
<?php endforeach; ?>
</ul>
</section>
<?php endif; ?>
Re: Add tag list to page footer
Posted: Sun Dec 29, 2019 3:21 pm
by susannemcom
Thanks, that worked perfectly!