• Resolved clearvertical

    (@clearvertical)


    Hi,

    I’ve just noticed that this plugin breaks the layout of the site I’ve built in IE9 (http://ucav.staging.wpengine.com/). When I disable the plugin the layout look fine, but as soon as I re-enable it the layout breaks. It seems to be showing the responsive version of the website instead. This is only in IE9 that this happens so I’m not sure what’s going on. I’ve tried changing the display to Skeleton Styles instead of Tribe Event Styles but that didn’t make a difference.

    Do you know what could be causing it?

    Thanks,
    Aimee

    https://wordpress.org/plugins/the-events-calendar/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello Aimee,

    That’s certainly odd! Does your responsive design rely on any JS that would possibly be conflicting here?

    It’s strange that a page that does not have the calendar on it would be affected by the plugin being activated. Do you see any instances where the plugin’s JS/CSS are being added to the the site inadvertently? If so, we can try to dequeue those from there.

    Cheers!
    Geoff

    Thread Starter clearvertical

    (@clearvertical)

    Hi Geoff,

    Just had a look and the JS files don’t seem to be loading on other pages but the css files do.

    These are the files that are being loaded on all pages:

    /plugins/the-events-calendar/resources/tribe-events-full.min.css
    /plugins/the-events-calendar/resources/tribe-events-theme.min.css
    /plugins/the-events-calendar/resources/tribe-events-full-mobile.min.css
    /plugins/the-events-calendar/resources/tribe-events-theme-mobile.min.css

    Do you think that’s the problem? How do you dequeue those?

    Regards,
    Aimee

    Hey Aimee,

    Dequeueing those files can be done with some code like the following:

    add_action( 'wp_enqueue_scripts', 'aimee_events_calendar_dequeue_css', 30 );
    
    function aimee_events_calendar_dequeue_css() {
        wp_dequeue_style( 'tribe-events-full-calendar-style' );
        wp_dequeue_style( 'tribe-events-calendar-style' );
        wp_dequeue_style( 'tribe-events-calendar-full-mobile-style' );
        wp_dequeue_style( 'tribe-events-calendar-mobile-style' );
    }

    Now, if there are only specific pages that you want that code to be removed from, you could find the page’s ID and only specify that code to run on that page. For example, if you found the page IDs you wanted to prevent the Calendar CSS from being loaded on to be 123, 43, and 869, you could modify the above function to look like this instead:

    add_action( 'wp_enqueue_scripts', 'aimee_events_calendar_dequeue_css', 30 );
    
    function aimee_events_calendar_dequeue_css() {
    
        if ( is_page( 123 ) || is_page( 43 ) || is_page( 869 ) {
            wp_dequeue_style( 'tribe-events-full-calendar-style' );
            wp_dequeue_style( 'tribe-events-calendar-style' );
            wp_dequeue_style( 'tribe-events-calendar-full-mobile-style' );
            wp_dequeue_style( 'tribe-events-calendar-mobile-style' );
        }
    }

    You can learn more about that is_page() function here → https://codex.wordpress.org/Function_Reference/is_page

    And you can learn about other conditionals instead of is_page(), which might help cast a wider net than just manually checking each page ID, here → https://codex.wordpress.org/Conditional_Tags

    I hope that helps!

    Cheers,
    George

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Plugin breaking theme in IE9’ is closed to new replies.