Closed nicolasprigent closed 1 month ago
The solution is documented here if you want : https://developer.wordpress.org/reference/functions/wp_dropdown_categories/#comment-content-886
Hi @nicolasprigent
as you can see there is the hook-filter, where you can change the arguments
use that hook for solve your issue
add_filter( 'jet-engine/post-types/admin-filters/taxonomy/args', function( $args ) {
$args['hide_empty'] = false;
return $args;
} );
thanks @Crocoblock, it worked ! I still suggest you to change this in your code since it's the default behavior of categories filter in wordpress. It would be more consistent in terms of user experience.
Describe the bug when I create a taxonomy admin filter and have only private posts, I don't see any filters in the dropdown.
To Reproduce Steps to reproduce the behavior:
Expected behavior The filter should show the used taxonomies even if there's only private posts.
Screenshots![attachment](https://github.com/Crocoblock/suggestions/assets/66468412/88b42746-a943-4ea6-9da8-84817501e725)
Desktop (please complete the following information):
Additional context I've found the problem in the file ==> wp-content/plugins/jet-engine/includes/components/post-types/admin-filters.php
When I add "'hide_empty' => false," in the render_filters function (screenshot_1), I see the list of categories as expected. Only post count doesn't work but that's not as big of a problem than the filtering.
Would it be possible to add this really simple fix in a future update of jet engine so that I won't have to redo the fix on every plugin updates ? Thanks