new WP_Query
-
We have an existing plugin that is using this on a search page:
global $query_string; $query_args = explode("&", $query_string); $search_query = array(); if( strlen($query_string) > 0 ) { foreach($query_args as $key => $string) { $query_split = explode("=", $string); $search_query[$query_split[0]] = urldecode($query_split[1]); } } $search = new WP_Query($search_query); ...if($search->have_posts())...
The if $search->have_posts fires correctly when the Relevanssi plugin is OFF. When ON, search breaks. And if we replace the WP_Query with the following:
$search = new WP_Query(); $search->parse_query($search_query); relevanssi_do_query($search_query);
…the $search->have_posts() ends up empty. I’ve tried a few more options from various support threads to no avail.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘new WP_Query’ is closed to new replies.