WP_User_Query search with multiple search queries
WP_User_Query search with multiple search queries
WP_User_Query search with multiple search queries
How do I dynamically generate args for wp_query?
You can use simple solution below. You need to use this function in the loop. You can collect tags/categories in an array or show tags/categories under the posts. $terms = get_the_terms( get_the_ID(), ‘category’ ); if ( $terms && ! is_wp_error( $terms ) ) : $catlinks = array(); foreach ( $terms as $term ) { $catlinks[] … Read more
A random thought: put the search string into an array ( with explode). Find the array position of the highlighted string. Count back xx for the start, and forward xx for the end. Extract those array values, then implode them back into a string. That would work for one searchresult word in the string. You’d … Read more
You can add a custom tax_query to your filter, and pass the search query to it: function searchfilter($query) { if ($query->is_search && !is_admin() ) { $s = $query->get( ‘s’ ); $query->set(‘post_type’, [ ‘lesson’, ‘series’ ] ); $query->set( ‘tax_query’, [ [ ‘taxonomy’ => ‘your-taxonomy’, ‘field’ => ‘name’, ‘terms’ => $s , ] ] ); } return … Read more
Search user metadata with checkboxes via ajax (almost working)
Search query – exact post title match
You have to modify WooCommerce search query. Hook into this action: do_action( ‘woocommerce_product_query’, $query, $instance ); Detect if it is a search query Add your _subtitle meta Something like this (not tested): if ( $query->is_search ) { $query->set(‘meta_query’, array( array( ‘key’ => ‘_subtitle’, ‘value’ => $query->query_vars[‘s’], ‘compare’ => ‘LIKE’ ) )); };
How to search Woo Commerce products with punctuation in title?
Extend ‘The Events Calendar’ search to include custom fields [closed]