Count Posts in Custom Post Type in Specific Taxonomy
-
I’m trying to display the number of posts in a custom post type that are also in a specific taxonomy. All I want to do is display something as simple as this:
24 Homes are For Sale
50 Homes are SoldRight now I have custom post type “homes” and two “home status” taxonomy categories of “for sale” and “sold”.
I can display the count for all posts of the custom post type “homes” using wp_count_posts, but I’m not sure how to get the count for ONLY the “for sale” or “sold” category under the “home status” taxonomy.
Any help or ideas would be great! Thanks!
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Count Posts in Custom Post Type in Specific Taxonomy’ is closed to new replies.