#125935 Sort the custom sidebars I created in alphabetical order

Landing Forums Jupiter WordPress Theme Sort the custom sidebars I created in alphabetical order

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • Claudio Vannucci

    Hi,
    sorry for my bad english… i use google translate!

    On the website, where i use jupiter theme, many custom sidebars have been created over time thanks to the jupiter theme option that allows you to create them.

    Now my client’s request is to give these sidebars an alphabetical order.

    In the wordpress widget area I see all the sidebars created but they are not in alphabetical order … is it possible to give an alphabetical order?

    Because I noticed that in the single posts, when I select custom sidebar, the choice becomes difficult as they are not listed in alphabetical order.

    Can you help me, thanks.

    Alexander Hutsol Support Team

    Hello,

     

    Please take our apologies, but such option is unavailable in the backend. I’m really sorry for this.

    Thank you for understanding.

     

    Regards.

    Claudio Vannucci

    Exsume Me,
    when i add a new sidebar with jupiter theme option… where are the tables created in mysql? Or what is the file that allows me to see the sidebars created? Could I intervene manually on the file or on the database?

    Thank You.

    Private
    Nodari Support Team
    This reply has been marked as private.
    Tatyana Hutsol Support Team

    Hello,

     

    To sort the sidebars in Jupiter Page Options section, you’ll need to edit the file wp-content/plugins/jupiter-donut/includes/meta-boxes/class.php on the line 1054, you’ll see the code:

    function mk_get_sidebar_options() {
    global $wp_registered_sidebars;
    $options = array();
    foreach ( $wp_registered_sidebars as $sidebar ) {
    $options[ $sidebar['id'] ] = $sidebar['name'];
    }
    return $options;
    }
    
    add_action( 'admin_init', 'mk_get_sidebar_options' );

    Add this string before the line return $options; :

    asort($options);

    So the code will be:

    function mk_get_sidebar_options() {
    global $wp_registered_sidebars;
    $options = array();
    foreach ( $wp_registered_sidebars as $sidebar ) {
    $options[ $sidebar['id'] ] = $sidebar['name'];
    }
    
    asort ( $options );
    return $options;
    }
    
    add_action( 'admin_init', 'mk_get_sidebar_options' );

     

    Note! You’ll have to edit this file after each plugin update.

     

    Thank you.

    Regards.

    Claudio Vannucci

    I apologize if I am only now responding to your assistance. I tried to make changes in the file … meta-boxes / class.php, but nothing happened.

    Alexander Hutsol Support Team

    Hello,

    Would you mind to provide us with FTP (FTP host, FTP user, FTP password, FTP port) login details to your site in the private reply https://prnt.sc/qr3w3e to check the issue?

    Thank you.

    Regards.

Viewing 7 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic.
Login