Select2.js messes up our custom code and filter bar disappears

Home Forums Calendar Products Filter Bar Select2.js messes up our custom code and filter bar disappears

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1358133
    Joanna Shebson
    Participant

    How can we deactivate the use of select2.js for the filter bar?
    it messes up some of our custom code and causes the filter bar to disappear.
    Quite urgent, thanks.
    funinjerusalem.com/calendar

    #1359187
    Victor
    Keymaster

    Hi Joanna!

    I’m sorry you are experiencing that issue. Let me help you with it.

    The following is a code snippet that will prevent the select2.js file to be loaded in the frontend:

    /**
    * An example for how to dequeue a script
    *
    * Obtain the handle of your script by searching through the code, and then
    * add a wp_deregister_script() function call for that handle.
    */
    function tribe_dequeue_script_example() { 
    wp_deregister_script( 'tribe-select2' );
    }
    add_action( 'wp_enqueue_scripts', 'tribe_dequeue_script_example', 100 );

    Bear in mind you would have to use checkboxes or dropdowns for all the fields. It will break autocomplete and the active filter coding, which in turn could break how the Filter Bar works.

    On the other side, while we don’t suggest to do it, you can downgrade to The Events Calendar version 4.4.3 which uses Chosen instead of Select2.

    I hope it helps you achieve what you are looking for. Let me know if there’s anything else I can help you with.

    Best,
    Victor

    #1369330
    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 ‘Select2.js messes up our custom code and filter bar disappears’ is closed to new replies.