所以,经过进一步的挖掘,我们终于找到了答案。使用高级自定义字段插件,我创建了一个文本字段,该字段显示在附件上,并应用了特定的标记。现在您可以分配一个值,我更新了我的WP\\U查询以反映:
<?php   
    $args = new WP_Query(array(
        \'post_type\' => \'attachment\',
        \'posts_per_page\' => -1,
        \'oderby\' => \'meta_value_num\',
        \'order\' => \'ASC\',
        \'post_status\' => \'any\',
        \'post_parent\' => null,
        \'meta_query\' => array(
            array(
                \'key\' => \'logo_sort_order\'
            )
        ),      
        \'tax_query\' => array(
            array(
                \'taxonomy\' => \'post_tag\',
                \'field\' => \'slug\',
                \'terms\' => \'logo\'
            )
        )
    ));
    while ( $args->have_posts() ) : $args->the_post();
?>
 希望这对其他人有帮助。