jjgrainger / PostTypes

Simple WordPress custom post types.
https://posttypes.jjgrainger.co.uk/
MIT License
373 stars 47 forks source link

taxonomy filter count incorrect when taxonomy is shared #23

Closed eballeste closed 2 years ago

eballeste commented 6 years ago

The total of the filter amount does not filter by custom post type. For example, I am getting 7 total for the healthcare taxonomy when, for the current edit screen, it should be showing 3.

screen shot 2018-04-30 at 3 45 55 pm
jjgrainger commented 6 years ago

Hi @eballeste

This will be down to a recent change with the drop-down. Rather than creating a custom dropdown from a terms array, it's now using wp_dropdown_categories which will display a count for all post types, not for the current one.

After a bit of research it looks like it would need another filter to set the post type for that query, or look for alternative function to create the drop-down.

Thanks for bringing it up, I'll see about getting it fixed. :)

jjgrainger commented 2 years ago

Related to #66

jjgrainger commented 2 years ago

This was resolved in #81 by removing the term count from the dropdown list to match how WordPress core creates dropdown filters.