3

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) : 
...
...

一些解决方案?谢谢

4

0 回答 0