Implementing Navbar
We will now see how to implement a Bootstrap navbar with a WordPress theme using wp-bootstrap-navwalker
. This is a really popular script that will integrate your navbar so that you can create sub-items and things like that.
Displaying menu
- Go to www.github.com/twittem/wp-bootstrap-navwalker, and we'll just go ahead and download the ZIP file. Open the ZIP file, and you'll see a folder with the PHP file inside it:

- Let's open up our project folder. We will copy the PHP file into our folder.
- Open the
functions.php
file and we want to include thewp_bootstrap_navwalker.php
file as shown:
<?php require_once('wp-bootstrap-navwalker.php'); function theme_setup(){ // Featured Image Support add_theme_support('post-thumbnails'); } add_action('after_setup_theme', 'theme_setup');
As you can see we have require_once()
with wp_bootstrap_navwalker.php
. Save it.
- Go back to the GitHub page where we'll now deal with the usage. We want to...