Dequeueing Events Calendar Pro scripts

Home Forums Calendar Products Events Calendar PRO Dequeueing Events Calendar Pro scripts

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1454197
    mbtscomm
    Participant

    Hi there,
    I’ve seen this question asked on the forums, but I’m having some trouble on my site. I’m trying to dequeue the following scripts (basically, I’m showing only a simple list on this page and I’d like to strip out the extraneous scripts from loading)

    https://beta.mbts.edu/wp-content/plugins/events … /src/resources/js/tribe-events-photo-view.min.js
    https://beta.mbts.edu/wp-content/plugins/events … dar-pro/src/resources/js/tribe-events-pro.min.js
    https://beta.mbts.edu/wp-content/plugins/events … pro/vendor/imagesloaded/imagesloaded.pkgd.min.js
    https://beta.mbts.edu/wp-content/plugins/events-calendar-pro/vendor/isotope/isotope.pkgd.min.js
    https://beta.mbts.edu/wp-content/plugins/the-events-calendar/src/resources/js/tribe-events.min.js
    https://beta.mbts.edu/wp-content/plugins/the-ev … tstrap-datepicker/js/bootstrap-datepicker.min.js
    https://beta.mbts.edu/wp-content/plugins/the-ev … dar/vendor/jquery-resize/jquery.ba-resize.min.js

    I’ve tried the following code in functions.php, based on what I was able to pick up here on the forums:

    function dequeue_events_calendar_scripts() {
    wp_dequeue_script(‘tribe-events-jquery-resize’);
    wp_dequeue_script(‘jquery-placeholder’);
    wp_dequeue_script(‘tribe-events-bootstrap-datepicker’);
    wp_dequeue_script(‘tribe-events-bar’);
    wp_dequeue_script(‘tribe-events-calendar-script’);
    wp_dequeue_script(‘tribe-events-list’);
    wp_dequeue_script(‘tribe-events-pro-geoloc’);
    wp_dequeue_script(‘tribe-events-pro’);
    wp_dequeue_script(‘tribe-events’);
    wp_dequeue_script(‘tribe-isotope’);
    }
    add_action('wp_enqueue_scripts', 'dequeue_events_calendar_scripts', 100);

    For some reason, this isn’t working (well, I know the isotope handle is probably not correct, that was just a guess). I also had this wrapped in a if ( is_front_page() ) { } tag at first, but I thought the conditional might be screwing things up. That shouldn’t be the case though, right? Ideally, I’d like to be able to conditionally dequeue these scripts on different pages depending on what my needs are. Is this possible?

    Andrew

    #1455623

    Hi Andrew,

    Thanks so much for reaching out!

    You can try the following extension to help you dequeue some of your scripts:

    https://theeventscalendar.com/extensions/dequeue-assets/

    Let me know how that goes!

     

    Thanks,

    Jaime

    #1475545
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Dequeueing Events Calendar Pro scripts’ is closed to new replies.