BuddyDev

Search

[Resolved] How to sort Sitewide Gallery

  • Participant
    Level: Initiated
    Posts: 6
    Fah Q on #18220

    Hello, how do I sort the sitewide listing of all galleries by alphabetical order?

    I have tried in functions.php but it does not work:

    
    function buddydev_modify_media_order( $args ) {
    
    $args['orderby'] = 'title';
    
    return $args;
    }
    add_filter( 'mpp_main_media_query_args', 'buddydev_modify_media_order' );
    
    • This topic was modified 5 years, 6 months ago by Brajesh Singh. Reason: updated quotes in code
  • Keymaster
    (BuddyDev Team)
    Posts: 24212
    Brajesh Singh on #18221

    Hi Fah Q,
    Please use ‘mpp_main_gallery_query_args’ filter for gallery. Also, by default, ‘order’ is set to ‘DESC’, you might want to set that to ‘ASC’

  • Keymaster
    (BuddyDev Team)
    Posts: 24212
    Brajesh Singh on #18435

    Marking resolved due to lack of reply from the topic author.

The topic ‘ [Resolved] How to sort Sitewide Gallery’ is closed to new replies.

This topic is: resolved