I'm having some problems filtering posts based on the value of a meta checkbox.
Essentially, I only want posts to show up if the "archived" checkbox isn't ticked.
This seems to work fine on most templates, but for archive.php and tag.php I just can't get it to work properly. pre_get_posts just doesn't want to filter based on these values.
To troubleshoot this, I want to echo the number of ticked and unticked checkboxes to the front end.
What's the best way to echo number of posts that meet the below criteria to the front end using a test template?
Echo number of posts where epi_pubarchive != 0
Echo number of posts where epi_pubarchive == 1
(I have multiple custom post types, so ideally the solution will incorporate all of them!)