Skip to content

Instantly share code, notes, and snippets.

@jchristopher
Last active August 2, 2024 12:40
Show Gist options
  • Save jchristopher/3135783eb3521bebbc5e to your computer and use it in GitHub Desktop.
Save jchristopher/3135783eb3521bebbc5e to your computer and use it in GitHub Desktop.
Disable the default SearchWP Live Search results theme CSS while retaining the positioning
<?php
function my_remove_searchwp_live_search_theme_css() {
wp_dequeue_style( 'searchwp-live-search' );
}
add_action( 'wp_enqueue_scripts', 'my_remove_searchwp_live_search_theme_css', 20 );
@mister-cairns
Copy link

This doesn't seem to work in WP 4.7.5. I've added to functions.php and it's still outputting <link rel="stylesheet" href="/wp-content/plugins/searchwp-live-ajax-search/assets/styles/style.css"> in <head>.

@matthiashonert
Copy link

@mister-cairns It works when you set a priority number like this:

function my_remove_searchwp_live_search_theme_css() { wp_dequeue_style( 'searchwp-live-search' ); } add_action( 'wp_enqueue_scripts', 'my_remove_searchwp_live_search_theme_css', 20 );

@skoapie
Copy link

skoapie commented Aug 2, 2024

it's changed to:
wp_dequeue_style( 'searchwp-forms' );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment