How do I exclude posts from custom taxonomy from a custom post type archive?
Several things to consider so let’s look at each one individually: Preserve Admin Screens As written, your function affects every page for that post-type, including your admin screens which will hide your filtered posts from all post listings. Test to see if an admin screen has fired the post type query with is_admin() and return … Read more