Skip to content

Instantly share code, notes, and snippets.

@ihslimn
Last active March 3, 2026 07:54
Show Gist options
  • Select an option

  • Save ihslimn/f634a7c32c731e2be3ae17260e46adb7 to your computer and use it in GitHub Desktop.

Select an option

Save ihslimn/f634a7c32c731e2be3ae17260e46adb7 to your computer and use it in GitHub Desktop.
JetSmartFilters Add option like '1000+' to check range
<?php
add_filter( 'jet-smart-filters/filters/filter-options', function( $options, $filter_id ){
$filter_list = array(
'269396' => true
);
if ( ! isset( $filter_list[ $filter_id ] ) ) {
return $options;
}
foreach ( $options as $key => $label ) {
$pair = explode( ' — ', $label );
if ( intval( $pair[1] ) === 9999999 ) {
$options[ $key ] = $pair[0] . '+';
}
}
return $options;
}, 999, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment