Filter terms count with callback
-
Hi there. I use a callback per your documentation to populate the grid with custom post type posts which have ‘publish’ or ‘future’ post status with a date_query parameter to exclude posts before today.
Use case: a travel event grid, so I use the publish date for sorting and travel date, and custom taxonomies for front-end sorting.
Problem: Filter taxonomy terms count [i.e. “Rome (2)”] seem to be counted based on all published posts only (past posts, and no future/scheduled posts).
I’ve tried several things, but I can’t seem to figure out how to override this. I also played with Appearance > Filter Settings > Display Terms. Selected or All Terms work (with wrong count) and both (hide empty) options hide all posts.
The page I need help with: [log in to see the link]
You must be logged in to reply to this topic.