Post count for particular term
Your query is completely wrong. You should use a proper tax_query. Also note, your query is quite expensive to run to just count posts. Set the fields paremeter to only return post ID’s. This saves up to 99.9% on resources. Just a note, the field parameter inside a tax_query is important. The valid values are … Read more