Last active
December 7, 2024 17:09
-
-
Save rmorse/fab982d8669185c12844c8012c8ae9ff to your computer and use it in GitHub Desktop.
Dequeue styles presets CSS from Search & Filter v3
This file contains hidden or 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( 'search-filter/frontend/enqueue_styles', 'search_filter_remove_ugc_styles' ); | |
/** | |
* Remove UGC styles (Styles Presets CSS file) | |
*/ | |
function search_filter_remove_ugc_styles( $styles ) { | |
$position = array_search( 'search-filter-ugc-styles', $styles, true ); | |
if ( $position !== false ) { | |
unset( $styles[ $position ] ); | |
} | |
remove_filter( 'search-filter/frontend/enqueue_styles', 'search_filter_remove_ugc_styles' ); | |
return $styles; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment