how to order documents by name instead of date

in Download Manager Free

Viewing 8 posts - 1 through 8 (of 8 total)
Apr 23, 2020 at 9:21 am
#126490
Participant
Fabien Galiana
OP

Hello
all documents are shown / ordered by date. latest added first. but how can we order them by name instead, beginning by numbers and A ?
thx !

Apr 24, 2020 at 4:30 pm
#126630
Moderator
Nayeem Riddhi
Staff

Hi,

Which shortcode you are using? generally, you can use order_by="title" for ordering them by name. please check

Thanks.

May 5, 2020 at 12:51 pm
#127567
Participant
Fabien Galiana
OP

there is no shortcode, the documents lists are direct links from categories assigned as menu items.

May 5, 2020 at 4:26 pm
#127595
Moderator
Nayeem Riddhi
Staff

Can you provide the page link for the clarification?

Thanks.

May 5, 2020 at 4:41 pm
#127598
Participant
Fabien Galiana
OP
This reply has been marked as private.
May 5, 2020 at 6:37 pm
#127607
Moderator
Nayeem Riddhi
Staff

Hello,

Please, give your temporary wp-admin login details in a private reply for the adjustments.

Thanks.

May 5, 2020 at 7:04 pm
#127613
Participant
Fabien Galiana
OP
This reply has been marked as private.
May 12, 2020 at 6:04 am
#128088
Moderator
Nayeem Riddhi
Staff

Hi,

Thanks for your having patience, I have just adjusted sorting using the below code putting in your theme functions.php

add_action( 'pre_get_posts', 'wpdm_sort_staff_cat' );
function wpdm_sort_staff_cat( $query ) {
        if ( $query->is_tax() || $query->is_post_type_archive('wpdmpro') ) {
            $query->set('orderby', 'title');  
            $query->set('order', 'desc'); 
               
    }
}

Thanks.

Viewing 8 posts - 1 through 8 (of 8 total)

The topic "how to order documents by name instead of date" is closed to new replies.