Problem after 2.1.7 – no posts returned
-
Hi, We have a page that has been working fine for many years. After upgrading Search Exclude to 2.1.8, the page stops returning results. I upgraded WordPress to 6.7.1 and tried Search Exclude 2.2.0, but it still doesn’t work and there are no errors. When I downgrade Search Exclude to 2.1.7, then it works fine (still w/ WP 6.7.1).
This is the query that is no longer returning posts after 2.1.7:global $wp_query;
$wp_query = new WP_Query(array(
'post_type' => array('post', 'video', 'rl_gallery'),
'post_status' => 'publish',
'fields' => 'ids',
'number' => $page_size,
'offset' => ($paged-1) * $page_size,
'orderby' => 'date',
'order' => 'DESC',
'tax_query' => array(
'relation' => 'OR',
array(
'taxonomy' => 'category_common',
'field' => 'term_id',
'terms' => array(CAT_COMMON_TOPIC_PAGE, CAT_COMMON_TOP_NEWS_VIDEO),
),
array(
'taxonomy' => 'category',
'field' => 'term_id',
'terms' => array(CAT_NEWS, CAT_NEWS_IN_THE_NEWS, CAT_NEWS_PRESS_RELEASES),
),
array(
'taxonomy' => 'rl_category',
'field' => 'term_id',
'terms' => array(RL_CATEGORY_FALUN_GONG),
),
),
));The end result is that have_posts() is false.
I do know that the problem has something to do with the ‘tax_query’ because if I comment that out, then the query at least returns posts. I didn’t build this site, so I don’t know the details, but it seems those taxonomies (e.g. ‘category_common’) are created using the Pods – Custom Content Types and Fields plugin. The constants like ‘CAT_NEWS’ are just category id’s.
Any ideas on what changed from v2.1.7 to v2.1.8 that might be causing this problem?
Thanks!The page I need help with: [log in to see the link]
- You must be logged in to reply to this topic.