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

WordPress

Bootstrap drop-down not working in WordPress anymore [fixed?]

I built a website using WordPress and bootstrap, I then replaced the core jQuery 1.11.0 with a CDN version 2.1.1 and everything seemed to be fine. I also called a CDN version of bootstrap.js and things still worked fine. Following the Bootstrap and WordPress course here on Treehouse, I added a plugin bootstrap shortcodes and things quit working as they should have. Namely my navbar drop-downs quit firing. If I reverted back to the included jQuery 1.11.0 it would work, upon inspecting the DOM I found though my bootstrap.js was not loading because I had set it to require my my jQuery 2.1.1, so I went in to my funtions.php and changed it to require the stock jQuery and the bootstrap.js would then load but my drop-downs would quit working again. I did some more looking and found that the Bootstrap Shortcodes plugin was loading its on included bootstrap.js and it seemed be colliding with my CDN so I removed the Bootstrap Shortcode plugin and everything works fine.

So if anyone added the plugin and is running in to that issue, it seems to be the included bootstrap.js not playing well with the CDN version.

I now need to find out how I can make all my widget plugins which load JavaScript in the head load instead in the footer (I've always been told to load JavaScript after the page as 'best practice'.) and also figure out how to allow the Bootstrap Shortcode plugin to use my CDN version of bootstrap.js.

4 Answers

Graeme Ellis
Graeme Ellis
13,439 Points

I found the same problem with the plugin but wasn't sure why the dropdowns had stopped working. Thanks for sharing.

Would it be a good idea to pass on the info to the developer?

Thanks, MANY new things in the works.... MUST LEARN MORE!

Certianly, it would be great to be able to use that plugin.