Created
August 9, 2021 21:49
-
-
Save tripflex/02cf8109e31b166cd81d867cd82a0d0a to your computer and use it in GitHub Desktop.
Hide categories/taxonomies not associated with listings from showing in WP Job Manager Search and Filtering
This file contains 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_and_filtering_get_taxonomy_data_options_args', 'smyles_sf_tax_hide_empty' ); | |
function smyles_sf_tax_hide_empty( $args ){ | |
$args['hide_empty'] = true; | |
return $args; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment