Support

Home Forums Event Espresso Premium Event Espresso Calendar in X-Theme using Cornerstone

Event Espresso Calendar in X-Theme using Cornerstone

Posted: January 6, 2018 at 5:20 pm

Viewing 8 reply threads


Dr Ian Coleman

January 6, 2018 at 5:20 pm

Hello, I have developed my site using X-Theme and the Cornerstone page editor. When inserting the calendar shortcode [ESPRESSO_CALENDAR] all I get are the drop-downs but no calendar. I tried inserting the code into a page without using cornerstone and the calendar worked ok. How can I resolve this issue to allow me to continue using cornerstone?

Thanks,

Ian


Tony

  • Support Staff

January 8, 2018 at 6:29 am

Hi Ian,

How are you adding the calendar shortcode within Cornerstone? In a text element?


Dr Ian Coleman

January 9, 2018 at 11:01 am

Hi Tony,

Yes, I’ve inserted the shortcode into a text box but have also tried using the content box too with no joy.

Any help would be greatly appreciated.

Ian


Tony

  • Support Staff

January 10, 2018 at 5:35 am

The calendar will only load its assets if EE has detected the shortcode is in use within the content, often page builders can confuse the tracking so the scripts are not loaded on the page.

There are a couple of options to fixing this, the first is using this snippet:

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

On lines 6 through 9 the snippet changes for specific page IDs, you need to change those to the correct ID(s) you want the calendar script to load on, or use the page slugs, either is fine.

The other option (which I don’t recommend over the above) is to load calendar scripts everywhere, you can do that using this snippet:

https://gist.github.com/joshfeck/5d9c88fea504c0b111c3df8f24ad25d9

Add either of those functions to a Custom Functions Plugin on your site, set the page IDs/slug if using that function and the calendar should load.


Dr Ian Coleman

January 10, 2018 at 1:22 pm

Hi Tony,

I have tried this but still no calendar I am afraid. I created the Custom Functions Plugin using FileZilla and see that it is now available and editable within the Plugin Editor (code used below).

When opening the page: http://www.messy-senses.co.uk/event-calendar/

All that loads are the filter drop-downs and the advertising text: Online event registration and ticketing powered by Event Espresso

Have I missed anything?

<?php
/*
Plugin Name: Site plugin for messy-senses.co.uk
Description: Site specific code for messy-senses.co.uk
*/
/* Begin Adding Functions Below This Line; Do not include an opening PHP tag as this sample code already includes one! */

add_action( ‘template_redirect’, ‘my_calendar_load_scripts’ );
function my_calendar_load_scripts() {
if ( is_page(
array(
2755,
// add more IDs if needed
)
) && class_exists( ‘EED_Espresso_Calendar’ ) ) {
add_action( ‘wp_enqueue_scripts’, array( EED_Espresso_Calendar::instance(), ‘calendar_scripts’ ) );
if ( EED_Espresso_Calendar::instance()->config()->tooltip->show ) {
add_filter(‘FHEE_load_qtip’, ‘__return_true’ );
}
}
}

/* Stop Adding Functions */


Dr Ian Coleman

January 10, 2018 at 1:27 pm

I have also tried the other code to load the calendar script across the whole site but with the same outcome.

Do you have any other suggestions that will allow me to continue using X-Theme and Cornerstone?


Tony

  • Support Staff

January 11, 2018 at 2:43 am

Is the code currently active right now?

To confirm, is the ‘Site plugin for messy-senses.co.uk’ plugin activated on the site?


Dr Ian Coleman

January 18, 2018 at 12:29 pm

Tony, thanks for the help, the plugin was deactivated so this resolved the issue 🙂


Tony

  • Support Staff

January 18, 2018 at 4:01 pm

You’re most welcome, I’m glad it working for you now 🙂

Viewing 8 reply threads

The support post ‘Event Espresso Calendar in X-Theme using Cornerstone’ 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