5 Replies to “Tag Cloud Filter to Show Current Tags”

  1. Hi Michael,
    Sure – this is the link to the site, the page ‘tag-archive’ of a specific tag. the tag is highlighted correctly:
    http://www.reali.org.il/tag/%D7%91%D7%99%D7%AA-%D7%91%D7%99%D7%A8%D7%9D/
    the tags are on the bottom right side.

    On a ‘single’ post of that tag (click on one of the posts there) the tag is not highlighted:
    http://www.reali.org.il/blog/%D7%91%D7%99%D7%AA-%D7%91%D7%99%D7%A8%D7%9D-%D7%A2%D7%91%D7%95%D7%93%D7%95%D7%AA-%D7%92%D7%9E%D7%A8/
    (actually now I see that a different tag is highlighted – the last one on the list which is not the correct one, it’s always highlighted on single posts)
    The site is based on a twenty ten theme, I am using just the post tags taxonomy.

    Thanks a lot for your help,
    Dan

    1. interestingly, the last tag in the list is highlighted in the single post; there might be something in the code of your theme which alters the current query string of the single post.

      try to add ‘wp_reset_query();’ before the call of the sidebar.

  2. Hi,
    I used the above code, thanks alot.
    In the tag archive page it does add the “current-tag” class, but when I go into a single page there is no “current-tag” class added to the link in the tag cloud?
    Am I missing something?

    thanks
    Dan

    1. hi Dan,
      the code should work on single posts as well; I just double-checked in a local test site with Twenty Ten. are you using any other taxonomy than post tags? have you checked the html output of the single post in your browser to see if the .current-tag class is added? can you send me a link to your site so I can have a look?

Leave a Reply to michael Cancel reply

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