Forums

[resolved] single tag title won't display in sidebar? (8 posts)

  1. Pete
    Member
    Posted 3 months ago #

    I'm not sure why the tag isn't showing in my sidebar when I am looking at that a tag page?

    [Code moderated as per the Forum Rules. Please use the pastebin]

    [No bumping, thank you.]

  2. Pete
    Member
    Posted 3 months ago #

    here's my code...

    http://pastebin.com/T8p7rWDc

  3. alchymyth
    The Sweeper
    Posted 3 months ago #

    single_tag_title() only works in tag archive pages -

    http://codex.wordpress.org/Function_Reference/single_tag_title

    what are you trying to show?

    consider using http://codex.wordpress.org/Function_Reference/get_the_tags

  4. Pete
    Member
    Posted 3 months ago #

    I know that... and i want the tag to show in the sidebar of my tag page

    I'm trying to show the code that I pasted in pastebin

  5. alchymyth
    The Sweeper
    Posted 3 months ago #

    the code pasted in the pastebin will not work, possibly because you are using a new query for the loop.

    try to save the single tag title to a variable before the query_post line.

    then echo that variable in the loop.

  6. Pete
    Member
    Posted 3 months ago #

    i have no idea how to do that

  7. alchymyth
    The Sweeper
    Posted 3 months ago #

  8. Pete
    Member
    Posted 3 months ago #

    Thanks so much for that, it worked a treat. I owe you a beer :)

Reply

You must log in to post.

About this Topic