让我们假设,我正在使用这个
$categories1=get_categories('orderby=name&order=ASC&hide_empty=0&parent=4');
在这一行中,它将返回一个属于parent=4类别的类别列表。我想要来自双亲类别的列表,我尝试使用类似的逗号
$categories1=get_categories('orderby=name&order=ASC&hide_empty=0&parent=4,8');
但是它返回的是null数组。所以可以从双亲那里得到分类列表吗?
文档说它只接受一个整数,而不是字符串,比如exclude或include,您可以在其中列出id。您可能需要进行2次查询并合并数组。