开发者

How can I filter child categories of "uncategorized" out of the loop?

开发者 https://www.devze.com 2023-01-12 10:24 出处:网络
I have some utility categories that are only used by my theme. How can I make sure that any call to categories exclud开发者_StackOverflowes the child categories under \"uncategorized\"?Try something a

I have some utility categories that are only used by my theme. How can I make sure that any call to categories exclud开发者_StackOverflowes the child categories under "uncategorized"?


Try something along the lines of:

wp_list_categories(array(
    "exclude" => get_cat_ID("Uncategorized")
));
0

精彩评论

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