Support

Home Forums Events Calendar Add-on Event Calender not showing when using shortcode in theme template

Event Calender not showing when using shortcode in theme template

Posted: April 20, 2016 at 1:43 pm

Viewing 10 reply threads


Thomas Jordan

April 20, 2016 at 1:43 pm

I apologies upfront as I know there are many topics with this title but I have read a number and I still cannot get the calender to show.

I am currently trying to get the events calender showing in a private user portal powered by WP-Client. I have read many of the other related topics and have tried to resolve this on my own but I am not a seasoned WordPress developer. I have inherited the theme and most of the blog setup from a company who originally made the website for my client.

  • I have tried to take the calender out of the private portal and it still didn’t work.
  • I have checked the console and there is a JavaScript SyntaxError related to Yoast ‘s SEO plugin. This error hasn’t stopped any other JavaScript libraries from functioning on the website so I don’t think this is it.
  • I have tried a Theme Test Drive plugin with Twenty Sixteen but the calender still didn’t show.
  • I have checked the page and jQuery is loading before the calender’s JavaScript.

Can you advise anything else I can look at to figuring out what is going on?

Thanks in advance

  • This topic was modified 8 years, 8 months ago by Tony. Reason: Changed title


Thomas Jordan

April 20, 2016 at 1:44 pm

Sorry BTW the website is http://jbtotalfitness.co.uk/


Tony

  • Support Staff

April 21, 2016 at 4:09 am

Hi Thomas,

As it’s a private page we can’t view it, but any JS errors can cause issues with the Calendar.

Viewing your home page there is issue with the GA code you have in the theme currently. It looks like ['GoogleAnalyticsObject'] is being escaped [\'GoogleAnalyticsObject\'] which is causing a syntax error.

Can you send us temporary login details using this form:

https://eventespresso.com/send-login-details/

So we can view the page and see what we can find please?


Thomas Jordan

April 25, 2016 at 1:36 pm

Thanks Tony, Ok I will look into this error.

I have sent the credentials via the form you requested. Your help is really appreciated.

Tom


Tony

  • Support Staff

April 26, 2016 at 2:28 am

Hi Tom,

Can you double check those login details please, I’m getting invalid username when I try to log into the Dashboard.


Thomas Jordan

April 27, 2016 at 1:35 pm

Hi Tony,
I have removed the duplicate Google Analytics tracking script which removed the JavaScript TypeError and still the classes page won’t show the event calender.

Any other advise to get this calender working. Does the theme have the correct jQuery version?

Thanks Tom


Josh

  • Support Staff

April 28, 2016 at 7:07 am

Hi Tom,

It turns out the reason that the calendar isn’t displaying is because the calendar short code is placed directly within the page template instead of the page’s content. Event Espresso only loads the calendar’s assets if it detects the short code in the content.

You can add the code from the documentation to the top of the theme’s espresso_classes.php template ( just before the call to get_header(); ) and it will load the correct assets. Here’s a link to that documentation:

https://eventespresso.com/wiki/events-calendar-add-on/#ee4customizations


Thomas Jordan

April 28, 2016 at 2:39 pm

Hi Josh,

Thank you for your help this is brilliant and worked a charm. Really appreciate the help and apologise for having not read that part of the docs.

Is there a way I can update this post’s title etc to help others find a solution to this problem if they are having it themselves?

Thanks again,
Tom


Josh

  • Support Staff

April 28, 2016 at 2:51 pm

Hi Tom,

Sure, what do you want to change the post title to?


Thomas Jordan

April 28, 2016 at 2:55 pm

I don’t know, something like:

“Event Calender not showing when using shortcode in theme template”


Tony

  • Support Staff

April 28, 2016 at 3:13 pm

Hi Thomas,

My apologies for not spotting that sooner, I’m glad Josh did 🙂

The good news is that if you still had the Google Anayltics code running that your previously did you would likey run into problems with the Calendar JS anyway, so it all wasn’t a waste.

Also I’ve updated your thread title to the title you requested.

Any further problems please do let us know.

Viewing 10 reply threads

The support post ‘Event Calender not showing when using shortcode in theme template’ 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