Wordpress - 按字母顺序对一个类别 post 排序

Wordpress - Sort post of one category alphabetically

我到了最后,我什至不确定我做的是否正确。 我将当前代码添加到 function.php,我需要更改一个特定类别的顺序。所以我的意思是说“内部交流”类别按添加日期或字母顺序显示帖子,但只有一个,我为其他人设置了不同的全局设置。 谁能帮我?谢谢。

$args = array(
    'posts_per_page'   => 5,
    'offset'           => 0,
    'category'         => 'interni-sdeleni',
    'orderby'          => 'post_date',
    'order'            => 'ASC',
    'include'          => 'interni-sdeleni',
    'exclude'          => '',
    'meta_key'         => '',
    'meta_value'       => 'interni-sdeleni',
    'post_type'        => 'post',
    'post_mime_type'   => '',
    'post_parent'      => '',
    'post_status'      => 'publish',
    'suppress_filters' => true );

$posts_array = get_posts( $args );

尝试使用此代码 -

$args = array(
'posts_per_page'   => 5,
'offset'           => 0,
'category'         => 'interni-sdeleni',
'orderby'          => 'name',
'order'            => 'ASC',
'include'          => 'interni-sdeleni',
'exclude'          => '',
'meta_key'         => '',
'meta_value'       => 'interni-sdeleni',
'post_type'        => 'post',
'post_mime_type'   => '',
'post_parent'      => '',
'post_status'      => 'publish',
'suppress_filters' => true );

$posts_array = get_posts( $args );