Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
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,888 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.