Support » Fixing WordPress » Displaying custom post types on category pages

  • Resolved Ameisenman


    I searched the web and didn’t found an answer to my question: I created some custom post types with the register_post_type function and gave them the taxonomies ‘category’ and ‘post_tag’. All goes well but when I try to open a category which holds the custom post type pages there is no post, nothing.
    How can get it to work? I mean, how to display those custom post type posts on the category/archive pages?


Viewing 2 replies - 1 through 2 (of 2 total)
  • <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts(array(
    	'post_type' => 've_products', // custom post type

    you have to query the custom post type, this is mine to display ve_products

    you will need to array your custom post type with post if you want bot normal posts and custom post types to display

    'post_type' => array('post', 've_products'),

    Thanx a lot! In conjunction with the ability of WordPress to give categories a different template (e.g. category-products.php), I managed it!!! Great!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Displaying custom post types on category pages’ is closed to new replies.