Skip to content

Instantly share code, notes, and snippets.

@nayemDevs
Created January 19, 2017 09:18
Show Gist options
  • Save nayemDevs/7104e13c0b32f2cceae3300503972768 to your computer and use it in GitHub Desktop.
Save nayemDevs/7104e13c0b32f2cceae3300503972768 to your computer and use it in GitHub Desktop.
Flatsome map issue
add_action( 'wp_enqueue_scripts', 'flatsome_child_live_search_script', 78 );
function flatsome_child_live_search_script() {
global $wp, $extensions_uri;
if ( isset( $wp->query_vars['settings'] ) && $wp->query_vars['settings'] == 'store' ) {
wp_dequeue_script( 'jquery-ui-autocomplete' );
wp_dequeue_script( 'flatsome-live-search' );
wp_dequeue_script( 'dokan-tag-it' );
$theme = wp_get_theme( get_template() );
$version = $theme->get( 'Version' );
wp_enqueue_script( 'flatsome-live-search', $extensions_uri.'/flatsome-live-search/flatsome-live-search.js', FALSE, $version, TRUE );
wp_enqueue_script( 'jquery-ui-autocomplete' );
wp_dequeue_script( 'dokan-tag-it' );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment