Posted: June 27, 2018 at 7:52 am
|
The Events calendar add-on works on some pages, but not on all of them If you go to http://staging2.childrensmuseumineaston.org/, you can see it is not loading the calendar, but it will load properly on this page http://staging2.childrensmuseumineaston.org/57657-bb-test-ee-calendar/. Does anyone know what might cause this? The site is using Beaver Builder. Thanks for the help. EE Version 4.9.64.p |
Hi, I can’t see any of the pages you’ve linked to because of .htpassword. What usually causes the calendar issue is when the [ESPRESSO_CALENDAR] shortcode is used outside of the main content of a WordPress page or post, then it’s not tracked. The idea behind the shortcode/page tracking was to load the calendar JS and CSS only on the pages where needed. The problem with the implementation though is it’s not reliable to check only in the main content. To work around this, you can add some code into a functions.php file (or plugin) that will make it so the calendar scripts load: https://gist.github.com/joshfeck/5d9c88fea504c0b111c3df8f24ad25d9 In the above example, it’s checking for the “Calendar” page with: |
|
|
Hi Josh, I tried adding that function and it did not resolve the issue. I have removed the password so you should be able to access those pages now. Thanks for the help. |
Adding the function alone will not resolve it because the function WOULD need to be modified to check for the home page. Alternatively, since the page was edited with Beaver Builder, following these steps might help: |
|
|
Hi Josh, I did modify the function, when I added it. I also tried the steps that you suggested above and that did not resolve the issue. Thanks. |
May I ask can you post the entirety of the modified code that was added to the site into a pastbin or GitHub gist so we can review? |
|
|
Here is a link to the gist https://gist.github.com/richsalvucci/70a73b5463002a757bfc52af2f74f172 |
Ok this line: |
|
|
Hi Josh, Sorry it has taken a while to get back to you. I made the change in my code to is_front_page() and it is still not rendering as expected on the home page. Is there anything else I can do? Thanks! |
Can you verify that the code is actually loading and executing? For example was the code placed within a plugin file below a plugin header, and the plugin is activated? |
|
|
Hey Josh, I created a plugin to add the code that way and activated it. It is displaying properly now. Thank you so much for the help. |
The support post ‘Events Calendar works on some pages, but not all’ 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.