How to disable one script in calendar page: single, list, calendar…

Home Forums Calendar Products Events Calendar PRO How to disable one script in calendar page: single, list, calendar…

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #119487
    vserrano
    Participant

    Anyone know what would be the code to put in the “function” to prevent load one “archive.js” ONLY on every page that displays the calendar (list, single …)
    I know you use “wp_enqueue_scripts” but I have no idea how to do it.

    #119904
    vserrano
    Participant

    Yes, I still need assistance… I do not understand this “technical support”

    #120070
    Brook
    Participant

    Howdy vserrano,

    I am not sure which script you are refferring to. My installation does not have an archive.js.

    That said, to dequeue any of our scripts you would use wp_dequeue_script, a built in function of WordPress. They have a good example in that link for dequeueing jquery.js, which is enqueued with the name ‘jquery’:

    add_action( 'wp_print_scripts', 'de_script', 100 );
    function de_script() {
    wp_dequeue_script( 'jquery' );
    wp_deregister_script( 'jquery' );
    }

    This snippet contains a bunch of if{} statements for detecting the various pages. For instance if you wanted to detect if this was a single events page you would use:
    if ( tribe_is_event() && is_single() ) { ... }

    I hope that helps! Please let me know.

    – Brook

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘How to disable one script in calendar page: single, list, calendar…’ is closed to new replies.