我必须使用名为order
的自定义字段显示带有自定义订单的类别(我填充了序号)。
我用来显示类别的代码:
$args=array(
'include' => array(22,4,21,23), //category IDs to display
'orderby' => 'meta_value', // => doesn't work
'meta_key' => 'order', // => doesn't work
'order' => 'ASC'
);
foreach (get_categories($args) as $cat) :
...
...
有些解决方案吗?感谢