10. 15.
本文对我是非常有用, 因为我一直无法解决wp_list_cats 如何不显示子分类的问题
但是本文也有遗漏或者说明不清楚的地方, 但是我要说的是, 其实wp_list_categories 和wp_list_cats里的参数几乎是可以通用的
例如我使用wp_list_cats来隐藏子分类一直不成功, 于是我按照本文, 设定为wp_list_categories(“depth=1&hierarchical=1&hide_empty=0″), 结果发现多出来”分类”两个字, 我是放在导航上的, 那不是很难看, 于是我使用wp_list_cats(“depth=1&hierarchical=1&hide_empty=0″), 看了下他们的函数, 可以通用, 呵呵
While you are customizing/developing your WordPress theme, if you found children=0 paramter is not working with wp_list_cats() function (deprecated), you should use wp_list_categories() function instead.
It’s important to note their parameters are different, comparison as below:
wp_list_cats > wp_list_categories
optionall > show_option_all
sort_column > orderby
sort_order > order
optioncount > show_count
阅读全文 »
hao32