Bootstrap 4 Wordpress  Navigation Menu

Bootstrap 4 Wordpress Navigation Menut

BOOTSTRAP NAVWALKER 

A custom WordPress nav walker class to implement the Bootstrap 4 navigation style in a custom WordPress Bootstrap based theme using the WordPress built in menu manager.


INSTALLATION

Download and place the bootstrap-navwalker file inside your theme folder, ie, inside /wp-content/themes/theme-name/ folder.

Now, require the file via the below PHP code addition inside your functions.php file of the theme:

require get_template_directory() . '/bootstrap-navwalker.php';

USAGE

Once you register the menu via the below PHP code in the funtions.php file:

register_nav_menus( array(
    'menu-1' => esc_html__( 'Primary', 'theme-textdomain' ),
) );

Now, you can display the menu in your theme via below PHP code addition in the header.php file of your theme.

click here to download the file