Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #607509

    Hi! i would like my sidebar to nest at every 2nd level title, for example at “Leadership and Teams”, “Communication”, “Personal Effectiveness” and so on. Otherwise the menu is huge. I can´t manage to do this.

    Any idea?

    Thanx!

    #607545

    Hi chaponnel!

    Is this how you like the sidebar to look like? When user click on a menu item it shows the 2nd level elements? This requires custom css and jQuery coding and it takes some time… We are working on your ticket please wait while we update the custom code here soon.

    Regards,
    Vinay

    #607552

    Exactly! if the user click on, for example Communication, then it displays the submenu of Communication.

    Thanx ill be waiting!

    #608038

    Hey!

    This customisation requires much time and custom coding we are working on your ticket please wait while we update the results here.

    Regards,
    Vinay

    #608699

    Hey!

    Please add the below code in Enfold > General Styling > Quick CSS

    .submenu-hide {
        display: none;    
    }
    .submenu-show{
        display: block!important;
    }
    

    Add the below code in functions.php

    // Custom submenu
    function custom_submenu(){
    ?>
    <script>
    jQuery(window).load(function(){ 
     var menu            = jQuery('#menu-item-170'),
         subMenu         = jQuery('#menu-item-170 .sub-menu li:has(ul)');
    
     subMenu.children("ul").addClass("submenu-hide");
     menu.find('li a').on('click', function(event) { 
    var parent = jQuery(this).parent();
            if (jQuery(this).parent().is('li:has(ul)')) {
                event.preventDefault();
                parent.siblings().find('ul.submenu-show').removeClass('submenu-show');
                parent.find('ul:first').toggleClass('submenu-show');                        
            } 
    });
    
    });
    </script>
    <?php
    }
    add_action('wp_footer', 'custom_submenu');

    Note: We could not test this code on your site as we do not have the credentials. Please create a temporary user with ‘administrator’ role and share in private content with permission to deactivate all plugins and add custom code if necessary to help you resolve this issue. We will also need FTP access just in case.

    Best regards,
    Vinay

    • This reply was modified 8 years, 7 months ago by Vinay.
    #618268

    Hello, sorry for the late reply, i´ve been out. I tried all of the above, not working.

    I created an admin user, here´s the data and the ftp access, let´s see if you can manage it!

    Thanx!

    #620558

    Hey!

    We would like to add the code but there is no functions.php file in the child theme. We can add it somewhere else but it’s more appropriate in the functions.php file. Create the file then add the code. We also noticed that the footer.php file is not updated. Please update that file as well.

    Regards,
    Ismael

    #622369

    Hi, i created the functions.php added the codes, but not working, what am i doing wrong?

    #624524

    Hi,

    I changed the code a bit, it should work now. 

    Best regards,
    Josue

    #627854

    Hey! thanx for your help, but the client didn´t like it, it was not what he was looking for, sorry.
    One problem came up, now i can´t see any submenu, nor in the sidebar or in the main menu…

    I removed your code from the functions php so i don´t know what could have happened, it was ok before that code!

    Thank you for your great support

    #627860

    Hey!

    You have this custom CSS code

    ul.sub-menu {
        display: none !important;
    }

    please remove it.

    Best regards,
    Yigit

    #628251

    I removed it but still not working…i can´t see the dropdowns in main menu nor the submenu in the sidebar

    #628254

    Hey!

    They show up fine on my end, attached a screenshot in private content field.

    Please flush browser cache and refresh your page a few times – http://wiki.scratch.mit.edu/wiki/Hard_Refresh

    Cheers!
    Yigit

    #628311

    That was it! i was going crazy, now it works, thans so much for your help!

Viewing 14 posts - 1 through 14 (of 14 total)
  • The topic ‘Sidebar Menu nested at 2nd level’ is closed to new replies.