…$query, $args, $defaults ) { global $flatsome_live_search_query; $flatsome_live_search_query = $args[‘s’]; $args[‘relevanssi’] = true; return get_posts( $args ); } This stores the search query in a global variable so that we can use it later elsewhere. Then we need a filter function to adjust the permalinks so that when the search……) ) { return; } global $post; if ( get_search_query() ) { $args = array( ‘post_type’ => ‘post’, ‘s’ => get_search_query(), ‘relevanssi’ => true, ); $query = new WP_Query( $args ); $posts = array(); while ( $query->have_posts() ) { $query->the_post(); array_push( $posts, $post->ID ); } $args = array( ‘post_type’ =>……post objects. */ function rlv_flatsome_search_function( $query, $args, $defaults ) { $args[‘relevanssi’] = true; return get_posts( $args ); } add_filter( ‘flatsome_ajax_search_function’, function() { return ‘rlv_flatsome_search_function’; } ); Improving live search with product variations If you want the live search to take the searcher directly to the right variation, here’s what you…