Support » Fixing WordPress » query_posts beyond codex

  • Hello. What I need to do is a custom query_posts to retrieve posts either from a tag or a custom field. I suspect I should use 'relation' => 'OR' between a tax_query array and meta_query array, but it seems that those two are somewhat not compatible.

Viewing 1 replies (of 1 total)
  • I believe that what you want will require the use of filters to modify the query. Here is an article that gives a very basic description of such filters:

    If you can use phpMyAdmin or a similar tool to create a query that works, you can use the filters to modify the query_posts() query to match.

    My guess is that you will need to start with a very basic query_posts() query and add ‘LEFT JOIN’s for the other tables needed.

Viewing 1 replies (of 1 total)
  • The topic ‘query_posts beyond codex’ is closed to new replies.