Tag Info

New answers tagged

1

As already hinted by @Milo, check if you have terms before appending your tax_query You can try the following: (Requires PHP 5.4+ due to short array syntax, revert to old syntax if necessary) $args = [ 'post_type' => 'product', 'posts_per_page' => 15, 'paged' => $paged, 'post__not_in' => $exclude, 's' => $filter, ]; // ...


0

Try this, it may help: if( !defined( 'ABSPATH' ) ) exit; function modify_wp_search_where( $where ) { if( is_search() ) { global $wpdb, $wp; $where = preg_replace( "/($wpdb->posts.post_title (LIKE '%{$wp->query_vars['s']}%'))/i", "$0 OR ( $wpdb->postmeta.meta_value LIKE '%{$wp->query_vars['s']}%' ...



Top 50 recent answers are included