query_posts oderby title causes items to not display for users
-
I have a custom post type set up for listing some exhibitors for trade shows and events. I can add, edit, delete the posts, as well as preview and publish them. The problem comes in my loop, when ordering the posts. I have a shortcode set up to be able to insert the exhibitor listing into pages or posts. If I set any “orderby” attribute, besides ‘id’, then some of the records are not displayed, unless I’m logged in with an admin account. I’ve verified that the posts are all marked as “published” and “public”, but no dice. When I order by ‘id’ they all show up, but they need to be ordered alphabetically by title in order to be usable.
$args = array( 'post_type' => 'exhibitor', 'orderby' => 'id', 'order' => 'ASC', 'posts_per_page' => -1, 'meta_key' => 'event', 'meta_value' => '<event_id>', //event ID entered based on shortcode attribute 'meta_compare' => '!=' //show all but this event -- this is correct behavior for my needs ); query_posts($args);It seems that any posts after a certain date are the ones that are left out when ordering by title, so the most recent entries (any past about July 1st, it seems) are not visible on the frontend unless I’m logged in as an admin, so the public are unable to see them.
The topic ‘query_posts oderby title causes items to not display for users’ is closed to new replies.