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

On the site I am developing I have a few custom post types set up (Press Releases, Articles, Podcasts). I also have the Tag Cloud widget enabled in my sidebar.

I have tagged a post with 'Testtest', and I've also tagged a Press Release with 'Testtest'. The problem I have is when I click the 'Testtest' tag on my tag cloud, it only shows the 'Post' that I tagged, and not the Press Release.

Any idea why this would be, or a solution?


share|improve this question
up vote 0 down vote accepted

you can add them using pre_get_posts filter:

function myTagFilter($query) {
    $post_type = $_GET['type'];
    if (is_tag()){
        if (!$post_type) {
            $post_type = 'any';
        $query->set('post_type', $post_type);
    return $query;
share|improve this answer
Thanks for your response, where would I put that code? – Probocop Mar 10 '11 at 13:57
Ah nevermind, found where. That does indeed show my other post types, though for some reason my navigation disappears on the tag pages now? – Probocop Mar 10 '11 at 14:54
the only thing this code changes is the post_type query on a tag archive so i can't really tell whats wrong there, if you create a pastebin of your code and output i'll know more. – Bainternet Mar 10 '11 at 18:33
I have the same problem - my navigation disappears on the tag pages.I will be very grateful if you find why – zina Mar 13 '11 at 8:40
Yeah we are going to need more info like what your tag page code is like – Bainternet Mar 13 '11 at 9:07

I had the same issue, the only fix I've found so far is to wrap the menu with a remove then add of the filter to stop it from breaking the menu.

share|improve this answer
Please show a code sample. Thanks. – kaiser Nov 22 '12 at 17:17

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.