How to sort custom post’s category by id from the theme’s function.php?

Question

I’m wondering how to sort a custom post’s categories in the selection field which I’ve circled in the screenshot?

my idea is to sort custom post's categories in the selection field which encircled

And I have the following code which generates category listing

 $args=array(
                'class'       => 'select-submit2',
                'hide_empty'  => false,
                'selected'    => $prop_category_selected,
                'name'        => 'prop_category',
                'id'          => 'prop_category_submit',
                'orderby'     => 'NAME',
                'order'       => 'ASC',
                'show_option_none'   => __('None','wpestate'),
                'taxonomy'    => 'property_category',
                'hierarchical'=> true
            );
        wp_dropdown_categories( $args ); ?>
0
anandmongol 2 months 0 Answers 13 views 0

Leave an answer