thehalogod
Member
Posted 4 years ago #
How do you enable the number of posts in a category to show up on the sidebar?
I'm using this theme:
http://wpthemes.info/shaded-grey
And want to be able to show the number of posts that are in a particular category for my blog. Let me know if you can do this.
miromiro
Member
Posted 4 years ago #
List categories:
'show_count' => 1,
thehalogod
Member
Posted 4 years ago #
Where do I put that in the sidebar though?
miromiro
Member
Posted 4 years ago #
It will say something like (depending on your theme - I am not familiar with shaded-grey):
<h2>Categories</h2>
<?php wp_list_categories('show_count' => 1'); ?>
</li>
Just search on 'list_categories'...
thehalogod
Member
Posted 4 years ago #
<?php wp_list_cats('optioncount=1'); ?>
I had the above. When I replaced that with:
<?php wp_list_categories('show_count' => 1'); ?>
I got a parse error and the sidebar wouldn't display. I also tried:
<?php wp_list_cats('show_count' => 1'); ?>
But that didn't work either. What am I missing?
Change that to:
<?php wp_list_categories('show_count=1'); ?>
You can see what else can be done with wp_list_categories(); here.
actorjiml is right - reading the documentation about the parameters is a great way to spare time :)