wordpress snippets last updated   : January 29, 2015
we now have 646 snippets

Display specific content if post has_tag or specific tag

wordpress snippet

Adding this snippet within the loop of your wordpress template will let you display specific content if a post has tags or not. Also note that has_tag(‘tag_name’) suports, tag name, term_id or slug and an array of tag names, term ids and slugs. Also a big thanks to Jeremy for submitting the following.

snippet :  PHPcopy
    echo 'this post has tags';
    }else {
    echo 'no tags sorry';
source →

Did you like this post? If so please share it with your friends. Thanks!