How to properly load the bootstrap walker php file in WP

Hooking bootstrap is pretty easy and gives you an awesome result. The only part that is tricky is the navigation, fortunately smarter people than myself have already figured this out. I suggest you take a look at this tutorial on using bootstrap navs with WP:

Integrating bootstrap and Worpdress menus

The only problem with these tutorials is they assume you are going to drop the nav_walker file into theme home directory. What happens when you want to place it in another folder? Personally I like to put all my bootstrap files in their own folder. After tinkering around with this for a while I come up with this line:

[dt_code]// Register Bootstrap Navigation Walker
include_once (‘inc/bootstrap/wp_bootstrap_navwalker.php’);[/dt_code]

In my example you would be placing the walker inside the bootstrap folder which is inside the inc folder. Happy bootstrapping!

 

About The Author

Leave a Comment

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top