Skip to content

Instantly share code, notes, and snippets.

@Crocoblock
Last active May 27, 2025 10:21
Show Gist options
  • Select an option

  • Save Crocoblock/ad0c0e6c4b5159d392ee247e27eed216 to your computer and use it in GitHub Desktop.

Select an option

Save Crocoblock/ad0c0e6c4b5159d392ee247e27eed216 to your computer and use it in GitHub Desktop.
JetSmartFilters Exclude filter options programmatically
<?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