Check if results contains specific custom post type
-
Hi everyone,
I have a custom taxonomy ‘software’ linked to two type of custom post ‘projects’ and ‘downloads’. When I perform a taxonomy search for a term, $posts get populated by posts of both types that shares the term and that’s fine.
What I would like to do is to check somehow if $posts contains both post-types or just one: if is present more than one post_type I’m adding a button to filter out specific post-type.
I’m good with all the taxonomy search, display and filter-out but I can’t figure how to ‘sense’ if there is more than one post-type within the results.
Is that even possible ?Cheers
Visual
- The topic ‘Check if results contains specific custom post type’ is closed to new replies.