Page 1 of 1

How to sort categories by number of posts in wordpress

Posted: Thu Feb 06, 2014 9:10 am
by djyoti90
I'm using this syntax for ordering categories by the number of posts in each categories.

Code: Select all

<?php wp_list_categories('title_li=&show_count=1&child_of=3&number=5&orderby=count'); ?>
Still it's not working.. It shows the categories ordered alphabetically. Please help me!

You can check it here on the sidebar

http://www.primobazaar.com/

Re: How to sort categories by number of posts in wordpress

Posted: Thu Feb 06, 2014 9:33 am
by Celauran
Syntax looks right. Are you sure it isn't ordering by count? Have you done a var_dump on the output? Otherwise displaying the count?