WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: Events Calendar] JS and CSS loaded in every page

[Resolved] [Plugin: Events Calendar] JS and CSS loaded in every page

Viewing 2 replies - 1 through 2 (of 2 total)
  • On (or around) line 200 of events-calendar.php you will find a line of code that looks like this:

    if(isset($_GET['page']) && strstr($_GET['page'], 'events-calendar')) {

    Please try the following code instead – you will need to replace 999 with your events page’s ID:

    if( is_page( 999 ) ) {

    Please note that this is considered “hacking” the plugin and you will need to repeat this if you ever decide to upgrade the plugin.

    Hope this helps,
    -Mike

    Thanks for the help, but it did not do the trick.

    I am using Events-calendar 6.6-beta
    and the pages are in a Local testing server

    At around line 200 there is
    if(isset($_GET['page']) && strstr($_GET['page'], 'events-calendar')) {
    That line is in the function EventsCalendarManagmentINIT()

    Seems to me that the js and the css comes from events-calendar.php around line 160

    function EventsCalendarINIT() {
    $inadmin = strstr[$svr_uri, 'wp-admin');
    if (!$inadmin) {
    wp_enque_scirpt('....');
    }

    Is it possible to call if( is_page(999)) from events-calendar.php ?

    Tried if ((!$inadmin) && (is_page(999)) {

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] [Plugin: Events Calendar] JS and CSS loaded in every page’ is closed to new replies.
Skip to toolbar