Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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
1  
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
2  
Post the code that you're using, it will make this a lot easier. –  m0r7if3r Feb 4 '12 at 3:58

1 Answer 1

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

 
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.