我有以下疑问:
<?php
$args = array(
\'hide_empty\' => false,
\'orderby\' => \'title\',
\'order\' => \'DESC\'
);
$terms = get_terms( \'projets-location\', $args );
if ( !empty( $terms ) && !is_wp_error( $terms ) ){
foreach ( $terms as $term ) { ?>
<h5 id="<?php echo $term->slug; ?>" class="filter-menu-item" data-filter=".<?php echo $term->slug; ?>">
<strong><?php echo $term->name; ?></strong>
</h5>
<?php }
} ?>
其中显示了
projets-location
分类法,我添加了
orderby
和
order
但它们仍然没有按字母顺序显示,我是在愚弄她还是我出了什么问题?如有任何建议,将不胜感激!