Support

Home Forums Event Espresso Premium Event Calendar does not load on Divi Theme Builder

Event Calendar does not load on Divi Theme Builder

Posted: November 22, 2019 at 7:31 pm

Viewing 2 reply threads


zafissa

November 22, 2019 at 7:31 pm

I am trying to load the Event Calendar (using a shortcode) but the calendar does not load. I am using the Divi Theme 4 (with Theme Builder). The calendar categories does load but the calendar itself does not. It works when I run the embed code or if I load a widget with the Calendar

The Grid view also does not work (it loads the content but not the styling). I have confirmed that wp_footer() is being used by my theme


zafissa

November 22, 2019 at 7:38 pm

An update to the above: I have tested this on a normal page and it loads fine.

http://development.usmaa.org.au/?page_id=4644#espresso_calendar

however on this page you can see that the category dropdown loads up but not the calendar

http://development.usmaa.org.au/


Josh

  • Support Staff

November 25, 2019 at 11:44 am

Hi,

When the calendar shortcode is input into a page builder and the page builder doesn’t pass the shortcode to the post content, then the calendar add-on doesn’t know to load its scripts.

You can force load the calendar scripts to your site’s home page by adding the following code to a site functions plugin:

add_action('get_header', 'my_load_ee_calendar_scripts');
function my_load_ee_calendar_scripts() {
    if (class_exists('EED_Espresso_Calendar') && (is_home() || is_front_page())) {
        global $is_espresso_calendar;
        $is_espresso_calendar = TRUE;
        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' );
        }
    }
}

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

Viewing 2 reply threads

The support post ‘Event Calendar does not load on Divi Theme Builder’ 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