Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
alida strydomCourses Plus Student 1,712 Points
"Bootstrap Shortcodes" plugin, and bootstrap.min.js...
Okay, I've just come to grips with being completely bald after pulling out all my hair during the frustration caused by trying to implement dropdown menu items via Edward McIntyre's "wp-bootstrap-navwalker" method for my Bootstrap Wordpress theme, and thought of a question that would benefit myself and anyone else struggling:
In Zak's Bootstrap-to-Wordpress course, he instructs us to include bootstrap.min.js AND install the "Bootstrap shortcodes" plugin...
As it turns out, the wp-bootstrap-navwalker approach was not working because of a plugin conflict caused by the Bootstrap shortcodes plugin. In addition to the bootstrap.js that i was including via functions.php, the plugin was including another copy of bootstrap.js, so the page was loading 2 instances of bootstrap.js.
Upon disabling the plugin OR removing the code code from my functions.php, wp-bootstrap-navwalker worked.
So, how are we supposed to deal with this issue? Suppose I want to keep the Bootstrap shortcodes plugin....do i remove the code from functions.php?...Will the bootstrap.js included by the plugin serve all the purposes that would otherwise have been served by including bootstrap.js (or bootstrap.min.js) in functions.php?
Tim Knight28,863 Points
There is actually a setting in the plugin. If you go into Wordpress Settings you'll see "BS Shortcodes". In there the first two settings on the page will let you load the CSS and JS files for Bootstrap. Since you're already loading them, just uncheck those boxes, save, and everything should work just fine with Bootstrap and the nav walker.