Last active
January 5, 2022 19:24
-
-
Save webdados/bdab78778d0d7e86200101b12ccdeec9 to your computer and use it in GitHub Desktop.
Make Flatsome live search work with Relevanssi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'relevanssi_search_ok', 'flatsome_live_search_relevanssi_search_ok' ); | |
function flatsome_live_search_relevanssi_search_ok( $search_ok ) { | |
if ( is_ajax() && isset( $_GET['action'] ) && trim( $_GET['action'] ) == 'flatsome_ajax_search_products' ) { | |
return true; | |
} | |
return $search_ok; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment