Support

Home Forums Event Espresso Premium Event Calendar javascripts not loading on one calendar, but are on another

Event Calendar javascripts not loading on one calendar, but are on another

Posted: August 10, 2017 at 5:38 pm

Viewing 2 reply threads


Linda Isarasakdi

August 10, 2017 at 5:38 pm

We have two calendars – one per province.

They use exactly the same shortcode, I’m simply using CSS to hide events for the unneeded province.

Each shortcode is running in a SiteOrigin Editor widget within PageBuilder.

All events that should be in each calendar have the correct categories checked and are Upcoming

I have “use shortcodes in widgets” turned on in my functions.php

We run many other calendars with no issues.

But this one calendar is only displaying the category list at the top – nothing else. And I can see in the source code that none of the EE Calendar javascripts are loading on this problem calendar page…

I’ve tried removing the shortcode and pasting it in again and updating – as suggested in some posts in the forum – but to no avail.

Puzzled Canuck


Josh

  • Support Staff

August 10, 2017 at 6:58 pm

Hi there,

If you add the shortcode to the main section of the page editor (not a widget area) do the scripts load? If so, then what you can do is add some PHP code to your site where you plug in an array of page IDs where you want to display the calendar and it will make sure the scripts and styles load on those pages. Here’s a link to a code example:

https://gist.github.com/joshfeck/a93625301ba269ce820214059064f2c6

You can add the above to a functions plugin or into your WordPress theme’s functions.php file.


Linda Isarasakdi

August 11, 2017 at 5:04 am

Thanks so much, Josh – the calendar is working now!

BTW before using your function, I tried the shortcode in just the regular WordPress page editor and it still didn’t work.

Viewing 2 reply threads

The support post ‘Event Calendar javascripts not loading on one calendar, but are on another’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso