A custom Wordpress walker to implement the Twitter Bootstrap dropdown navigation using the WordPress built-in menu manager. This is a utility class that is intended to format your WordPress theme menu with the correct syntax and CSS classes to utilize the Bootstrap dropdown navigation. It does not include the required Bootstrap JS and CSS files, you will have to include them manually. Between version 3 and version 4 of the walker there have been significant changes to the codebase. Version 4 of the walker is built to work with Bootstrap 4 and has not been tested for backward compatibility with Bootstrap 3. This walker is fully compliant with all Theme Review guidelines for wordpress.org theme submission. It requires no modification to be compliant but you can optionally replace the wp-bootstrap-navwalker text domain (which appears twice in the fallback function) with the text domain of your theme.
Features
- Between version 3 and version 4 of the walker there have been significant changes to the codebase
- To display the menu you must associate your menu with your theme location
- Review options in the Bootstrap docs for more information on nav classes
- Bootstrap 5 uses namespaced data attributes
- On some sites generating a large menu that rarely ever changes on every page request is an overhead that you may want to avoid
- This script included the ability to use Bootstrap nav link mods in your menus through the WordPress menu UI