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

Adding TWO modal windows to a Bootstrap theme in Wordpress

I was able to add modal windows to my Wordpress site thanks to the video "How to Add Bootstrap Modal Windows to your Wordpress Theme."

However, it doesn't want to work if I have more than one modal on the page. Clicking the button to open the second modal will cause the screen to darken, but the modal window never actually pops up.

Also, the code causes the black Wordpress admin bar at the top of the page to disappear.

Is there some kind of incompatibility between Wordpress and multiple bootstrap modals?

And before you ask, yes, the data-toggle and id are unique for the two modals.

2 Answers

Zac Gordon
STAFF
Zac Gordon
Treehouse Guest Teacher

Make sure that you're using unique IDs

Thanks Zac, but yes, the IDs are unique.

Nevermind, I've decided to go for only one modal for now. Thanks for your help