Custom Post Type UI
[resolved] WP_Query fails on certain custom post types (4 posts)

  1. doctorproctor
    Posted 3 years ago #

    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.


  2. Michael Beckwith
    Plugin Author

    Posted 2 years ago #

    Ever find a resolution to this Jim?

  3. doctorproctor
    Posted 2 years ago #

    Nope, no solution, but haven't been actively looking for the last 10 mos ;-).

    Jim P.

  4. Michael Beckwith
    Plugin Author

    Posted 2 years ago #

    Just wanted to check in.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Custom Post Type UI
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic