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

I'm using the first example from here: http://codex.wordpress.org/Function_Reference/get_the_tags but nothing is showing up.

There's nothing about get_the_tags in my function.php... nor do I know what to put there (sorry, amateur to wordpress)

Just trying to show the tags associated with the post.

Could anyone help?

share|improve this question
where in your template have you put the code? is it within the loop? – Milo Feb 4 '12 at 1:35
i'm using the twentyeleven theme just modified. it's in the content.php, which is in the loop via index.php, so yes. – elzi Feb 4 '12 at 1:42
Post the code that you're using, it will make this a lot easier. – mor7ifer Feb 4 '12 at 3:58

Here you go,

global $post;
$posttags = get_the_tags();
if ($posttags) 
            foreach($posttags as $tag) {
            $tagu = $tag->name;
            echo $tagu
share|improve this answer

Your Answer


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.