Howdy!
I have this code in my blog:
{exp:weblog:categories weblog="mainblog" show_empty="no" id="null2"}
<h6><a href="http://{path=spotlight/blog}">{category_name}</a>
{exp:query sql="SELECT count(exp_category_posts.entry_id) AS post_count
FROM exp_category_posts WHERE exp_category_posts.cat_id = {category_id} "}
({post_count} entries)
{/exp:query}
</h6>
<p>{/exp:weblog:categories}It’s returning the wrong number of posts across each category.
Look on the sidebar at the bottom. For what it’s worth, I put this code in my template when I had a bunch of other posts live on my blog. So, the initial count being reflected was likely the number of posts I had live when I put the code in the template. Then I went and “closed” those posts. Now I have have 2 blog posts that are in 3 categories.
It never updated. I pulled the code out, refreshed the page, and the numbers remain.
Any idea on why it won’t update?
Thank you!
GG