I'm having problems trying to limit number of subcategories that are displayed when using wp_list_categories and child_of.
<?php wp_list_categories('child_of=11&number=5'); ?>
The SQL LIMIT Works fine with parent categories, but not with subcategories (never shows the correct number of subcategories; usually off by 2 or 3). Is this a WP bug or am I just going crazy? I saw this topic awhile back.
http://wordpress.org/support/topic/161358?replies=1
Look at using the depth= parameter with the template tag, wp_list_categories(), rather than number=.
Thanks Michael but I thought depth paramter controls how many levels of subcats show? I am just trying to limit number of 2nd level subcats that display. For example:
Parent Cat
2nd level subcat1
2nd level subcat2
2nd level subcat3
2nd level subcat4
2nd level subcat5
2nd level subcat6
Let's say I try to limit these 2nd level subcats to only display 3 of them (e.g., "number=3"). That's when wrong amount is displayed (usually none or less than specified limit).
Ah, well I don't believe wp_list_categories() can do that.
Thanks Michael. Is this a bug or not a feature? If you can limit number of parent cats, it would seem logical that you should be able to limit number of subcats.
Depending on your answer to question above, where can I report bug or request new feature?
Not a bug as far as I know, but you should read Reporting Bugs just in case.
Feature request:
http://wordpress.org/extend/ideas/
Version 2.7.1 has fixed this issue.