get_posts and suppress_filters problem
-
Hi, first thank you for the plugin, is very useful and I use in my website.
I found a problem using get_posts() with the argument s=’something’. It activate the plugin with changes the WHERE clause but can’t change the JOIN clause because suppress_filters is true by default on get_posts().
In the function wp_es_custom_query() I changed the line:
if ( empty( $search ) ) {
by
if ( ( empty( $search ) ) OR ( $wp_query->query_vars[‘suppress_filters’] == true ) ) {
it resolve the problem
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘get_posts and suppress_filters problem’ is closed to new replies.