• Hi,

    I use <?php the_tags('Tags:', ', ', '<br />'); ?> to display all the tags that are attributed to a particular post. But there are some tags which I don’t want displayed even though these tags are attributed to the post.

    So for example if I gave a post called “Goat” the tags “animal”, “herbivore” and “docile” and I didn’t want the “docile” tag to be displayed what would I have to do? There is an easy way to exclude certain categories from being listed based on their ids (and with a functions.php hack) but I can’t seem to use the same for tags.

    Any help is highly appreciated!

Viewing 1 replies (of 1 total)
  • Not when using the_tags(). I think you’d need to use get_the_tags() instead and then use a combination of a foreach loop and if statements to construct a tag list that didn’t include certain tags.

Viewing 1 replies (of 1 total)
  • The topic ‘Is there any way to exlude certain tags from listing’ is closed to new replies.