WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 2 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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