How to use Bootstrap Carousel with WordPress posts Loop
Frontend, WordPress, Bootstrap, PHP
It is unavoidable to not use the Bootstrap carousel if you are using bootstrap in your pages.
When using it with WordPress can be a bit tricky to make it work dynamically with your WP data.
I noticed this is a recurrent problem with the same question being asked many times on stackoverflow.
In the end it’s quite an easy solution. The tricky part for me was to get the active class working properly.
For that I used the ternary logic and voilà.
Working example :
Bootstrap Carousel with Wordpress Loop - Desktop
You might want to read...
DailyUI
Daily UI - Rethinking the user experience #1
Transitions, delays, gradients, Jquery and et al....
WordPress/Bootstrap
How to use Bootstrap Carousel with WordPress posts Loop
Bootstrap can be a bit tricky to make it work dynamically with your WP data...