I’ve been stuck on this for a little while now, and have tried multiple ways to achieve this with no luck. I’ve been looking for two ways to display the total posts found on a specific, and non-specific, category page(s). To further specify, the first I’d like to show the total number of posts for a specific (parent) category page. The second, show the total number of posts for a single category (without specifying it’s ID, name or slug).
For example, I have an index page dedicated to my parent category, “Blog Entries”, which has several subcategories (Fashion, Beauty, Lifestyle, Travel, etc) that are all displayed on this page. In the title of this page I want it to display the total number of posts Blog Entries has including it’s sub categories like: Browsing all Blog Entries. 36 Posts Found. I have tried something like this:
However, this displays the total number as 0 because it’s only specifying the category ‘blog entries’ and is not including in it’s subcategories. I’m not sure how to get it to include it’s subcategories.
For the second example, in short I have a general category/archive page that I would like to have a same thing done in the title – Browsing all [category] Entries. 6 Posts Found. I have yet to find a solution that does not specify the category. Is this possible? I don’t really want to have to make specific pages for all my categories.
Thanks in advance!
- Hiện tại chúng tôi có hơn 25 nghìn bài văn mẫu các thể loại.
- Kho tài liệu, đề thi học sinh giỏi các lớp vô cùng phong phú.
- Mỗi ngày cập nhật hơn 100 đề thi chất lượng từ các website bán tài liệu lớn.
Tải đề thi VIP với giá siêu rẻ tại Vip.Dethihsg247.Com