The function the_tags(); gives output as: Tags: tag1, tag2. But I want to get the tags only without the text Tags:. How can I use the function so that it does not out the text`? Thanks.

1 Answer 1


Use something like <?php the_tags('', ', ', '<br />'); ?>

From Wordpress codex for the_tags():

<?php the_tags( $before, $sep, $after ); ?> 


$before (string) Text to display before the actual tags are displayed. Defaults to Tags:

$sep (string) Text or character to display between each tag link. The default is a comma (,) between each tag.

$after (string) Text to display after the last tag. The default is to display nothing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.