Custom post types not showing up in queries and search results

If you can’t get Custom Post Types showing up in a query you should make sure that if you aren’t specifying a post that that you specify any –  post_type=any

It’s also a good idea to do a query reset because there are many factors that can affect your queries.

<? global $query_string;
query_posts($query_string . "&post_type=any"); ?>
<!--Do your loop-->
<!--Reset Query-->
<? wp_reset_query(); ?>
<? php wp_reset_query(); ?>

Revisions

There are no revisions for this post.

Tags: ,

No comments yet.

Leave a Reply