Support » Plugin: Custom Post Type UI » [Plugin: Custom Post Type UI] WP_Query fails on certain custom post types

  • Resolved doctorproctor

    (@doctorproctor)


    Greetings – Curious whether the below problem is at all related to the Custom Post Type UI plugin I run:

    I have code that generates e.g. this page (see Recent Project Mashups and Recent Research Themes at right) which first checks to see if any instances of a custom post type exist for a given site, then displays a feed of recent posts. The code I’ve used, that has worked fine until recently, is e.g.

    <?php $queryfeed = new WP_Query( 'category_name='.$site.'&post_type=project-mashup' ); ?>
    <?php if ($queryfeed->have_posts()) { etc...

    What is odd is that the post type “project-mashup” no longer works in the above; same with “situated-themes” at bottom. In other words, have_posts() turns up false. (I’ve temporarily replaced both with “post” since there are posts for each of our sites, but this then displays an error on blank RSS feed.) But the custom post type “site-mashup” does work (this is the post type used to generate the sample page above). And another custom post type “research” also works. Both site-mashup and research are custom post types that include the site category; same with “post,” and same with the other two that no longer work…these are the two I need!

    I tried a workaround using query_posts instead of WP_query, and no change. Btw, the feeds themselves are generated using the custom post type names, and work just fine, so I’m sure it’s not a simple issue with the custom post type slug.

    Sure appreciate any ideas; thanks.

    Jim P.

    http://wordpress.org/extend/plugins/custom-post-type-ui/

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Custom Post Type UI] WP_Query fails on certain custom post types’ is closed to new replies.