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 ); ?> 

Parameters

$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.

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *