开发者

List custom categories

I want to display custom categories with their sub-categories in a nested list.

This seems to works:

<?php wp_lis开发者_Python百科t_categories('hide_empty=0&depth=2&hierarchical=1&title_li='); ?>

but if I include some custom categories it doesn't:

<?php wp_list_categories('hide_empty=0&depth=2&hierarchical=1&title_li=&include=7,8,1,4'); ?>


In general, the include parameter in query functions like this overrides all other parameters. That is, you'll only get back the categories that you include rather than the ones you include plus the ones queried for by the other parameters.

The query_posts, get_posts, and WP_Query constructs work like this, too.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜