Support

Home Forums Events Calendar Add-on Calendar not showing 11

Calendar not showing 11

Posted: September 20, 2016 at 7:00 am

Viewing 6 reply threads


rsthrive

September 20, 2016 at 7:00 am

Good Afternoon,
I’ve tried adding the calendar to a page using:
<?php echo do_shortcode(‘[ESPRESSO_CALENDAR]’); ?>

However, it shows up as just:
<div id=”espresso_calendar” class=”calendar_fullsize”></div>
<div style=”clear:both;” ></div>
<div id=”espresso_calendar_images” ></div>

inside the code and I can’t spot any JS errors in the console. Has anyone encountered this before?

Thanks


rsthrive

September 20, 2016 at 7:08 am

It looks as though it works fine if you place the shortcode in the page body but when using the do_shortcode function it shows up empty.


Tony

  • Support Staff

September 20, 2016 at 7:13 am

Hi there,

When using do_shortcode you also need to add the calendar scripts to the page.

Take a look here for an example of how to do that:

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


rsthrive

September 23, 2016 at 3:03 am

Thanks Tony, that sorted it. I was planning on using the calendar on a jquery show hide, but it looks as though it displays the top part of the calendar.

Please see: http://i.imgur.com/nnxa84P.png

Essentially the wrapper div which the calendar is contained in is hidden and then a jQuery(‘#eventsListView’).show(); is called but results in the chopped off calendar.

Any ideas on why this could be occurring?

Thanks again.


Josh

  • Support Staff

September 23, 2016 at 6:59 am

The load order of your scripts may be affecting this, where you’re hiding the div before the calendar is generated. You may be able to fix this by firing your custom script after the Ajax request is complete. Here’s a link to some documentation:

http://api.jquery.com/ajaxcomplete/


rsthrive

September 23, 2016 at 8:19 am

Hi Josh,
I’m not sure that’s it because as soon as the left and right buttons are clicked, the whole calendar appears.
Thanks


Josh

  • Support Staff

September 23, 2016 at 8:48 am

When you click the left and right button, it fires another ajax request. So if your code that hides the calendar runs before the initial ajax request, your calendar may not generate. I could be wrong though, so you may also need to also attach your custom code to a document ready event handler.

Viewing 6 reply threads

The support post ‘Calendar not showing 11’ 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