Custom conditional query problem
-
Hi,
I have a question – I need to display two different post types on the same page, ordered by date, but the conditions that apply to the two post types are different – one needs to be selected based on category, the other based on custom field value.
While the query_posts variables allow to select two post types, I can only have one set of selection criteria, and I cannot combine them with a logical connector (like the SQL AND).
Or is there a way to do this and I haven’t found it?
Using info found in the support forum it’s no big deal to create a direct SQL query to achieve what I’m trying to do, but doing this and setting up the loop post info with setup_postdata() apparently means that it’s impossible to use the built in paged navigation functions (previous/next). Is this correct? Is there a way around this?
Do I need to write custom navigation functions for this? I would really prefer to use WP-functions. Is there any way to do this?
Thanks for your help!
The topic ‘Custom conditional query problem’ is closed to new replies.