• Hi.
    I have created two custom post types (ex. movies and television). I am using categories for both of these also (same categories used in the blog using the normal posts tab). I created these post types using the Custom Post Type UI plugin.

    My problem is when I click on a category assigned to one of the new posts (ex. category of Horror) it should bring me to a list of all posts with that category. In this case though it is only showing posts that were created the from actual posts tab and not either of the custom posts tabs.

    How do I get WordPress to display the posts created from a Custom Post Type tab as an archive?

Viewing 3 replies - 1 through 3 (of 3 total)
  • I also have this problem… most annoying, any one got a fix yet?

    Nick

    Me too. Have you found a way around this yet?

    Hi all, this link might be helpful.

    Specifically this filter, although I removed the if statement to make custom post types show up in taxonomies as well as the front page.

    add_filter( 'pre_get_posts', 'my_get_posts' );
    
    function my_get_posts( $query ) {
        if ( is_home() && false == $query->query_vars['suppress_filters'] )
            $query->set( 'post_type', array( 'post', 'page', 'album', 'movie', 'quote', 'attachment' ) );
    
        return $query;
    }

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Custom Post Types not showing up in archive’ is closed to new replies.