Problem with 2 instances of the same carousel

I’ve put a carousel on the frontpage and it is running nicely,

Now I want to put the same carousel on a Landingpage, too. It shows up correctly, but it doesn’t cycle. I’ve isolated the code in a separate template, so obviously it can’t be a problem with the carousel’s code.

I’ve tried the data-ride method and the js method.

The one on the front-page is running, the other doesn’t.

Any ideas?

First step would be to open your console. Does it throw any errors?

Apologies for my ignorance, I’m working on a windows box w. XAMPP. Grunt is running nicely, I don’t use any other dev-environment such as bedrock. What console are you talking about?

No problem! I probably should have been more specific. If you’re using chrome or Firefox (I like chrome) go to the developer tools and open up the console. That should output any JS errors.

Oh, ok, this console you mean. Never really used that before. But I gave it a shot and it doesn’t output anything that could be assumed to be remotely associated with this issue.

Make sure your landing page template includes wp_footer(); or the scripts will not be output.

You could also go to the console and try manually initiating the carousel with $('.carousel').carousel();

It was the footer! Could’ve thought about the scripts in the footer actually!

1 Like