I want to display a particular message when a post has a specific tag on the article.
I've done this, however the 'Hello' text is being shown no matter if the post has the tag 'test' or not.
<?php if ( has_tag() == 'test' ) : ?>
Hello
<?php endif; ?>
has_tag
wrong. You should be attemptinghas_tag('test')
in your if.