What is “main query”?
Possible Duplicate:
How to know which one is the main query?
Possible Duplicate:
How to know which one is the main query?
I’ll just like to add that I have a current working solution in place and works well but I’m looking for ideas of being able to do it better or cleaner if possible.
I’ve been reading this by @nacin and getting to grips with wp_query over query_posts that I used to use.
i’m listing all posts of my custom post type “person” alphabetically sorted by the custom field last_name on a page.
I have a taxonomy wp_query and i would like to order the list by title and by meta value (numeric value)
I have a query as follows:
I have this code:
I would like to set a site’s front page to be a single post from a custom post type. I have been able to alter the request for my front page to a Custom Post Type archive with the following code (originally posted here):
I’m trying to get posts which have applied the meta value trainees.
Not sure how to achieve this. I’m trying to mix standard posts and custom posts on a site homepage but I only want to display the custom posts if a meta value is set. Displaying the posts works fine 'post_type' => array('game', 'post') but when I add in the meta_query the regular posts are no longer displaying (which makes sense as they don’t meet the meta_query condition).