Issue on Adding A Class to Bootstrap Navbar Walker Dropdown in WP

Using Bootstrap 3 and Navbar Walker I am able to create dynamic dropdown on the Bootstrap and WP template but I need to add .dropdown-menu-left to the .dropdown-menu class, as well.

As you can see I tried this by addig this line

'dropdown_class'    => 'dropdown-menu dropdown-menu-left',

to the original code but apparently it is not functioning correctly.

    <?php
        wp_nav_menu( array(
            'menu'              => 'desktop-main-menu',
            'theme_location'    => 'desktop-main-menu',
            'depth'             => 2,
            'container'         => 'div',
            'container_class'   => 'collapse navbar-collapse',
            'container_id'      => 'desktop-navbar-main-collapse',
            'menu_class'        => 'nav navbar-nav navbar-right',
            'dropdown_class'    => 'dropdown-menu dropdown-menu-left',
            'fallback_cb'       => 'WP_Bootstrap_Navwalker::fallback',
            'walker'            => new WP_Bootstrap_Navwalker())
        );
    ?>

can you please let me know how I can add the .dropdown-menu-left ul?

Read more here: Issue on Adding A Class to Bootstrap Navbar Walker Dropdown in WP

Leave a Reply

Your email address will not be published. Required fields are marked *