Last active
May 27, 2025 10:21
-
-
Save Crocoblock/ad0c0e6c4b5159d392ee247e27eed216 to your computer and use it in GitHub Desktop.
JetSmartFilters Exclude filter options programmatically
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( 'jet-smart-filters/filters/filter-options', function( $options, $filter_id ) { | |
| if ( $filter_id != 265823 ) { | |
| return $options; | |
| } | |
| $exclude = array( | |
| 24 => true, | |
| 30 => true, | |
| 25 => true, | |
| ); | |
| $options = array_diff_key( $options, $exclude ); | |
| return $options; | |
| }, 0, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment