Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Jonathandejong

    (@jonathandejong)

    Hi WolfCatDesigns,

    I’ve experienced this myself as well.. I’m actually working as official support on ACF ??

    The issue lies in the fact that ACF loads an older version of select2 (3.x) while BTF runs 4.x since it’s so much better. I’m going to try to convince Elliot that it’s due time to upgrade to 4.x! That way the incompatibility will be gone.

    In the meantime there’s not really an easy fix for this and I honestly don’t want to downgrade BTF to 3.x at the moment.

    Do you feel comfortable disabling select2 for the time being?

    Thread Starter WolfCatDesigns

    (@wolfcatdesigns)

    I can disable it for now on BTF (Although it ruins my sidebar vibe! lol).

    I found something interesting out – When I select no styling – it ignores all of my styling it was successfully using before – however, when I select Light and/or dark material design, it seems to display correctly! Interesting!

    Thanks for the quick reply!! I am loving ACF PRO but I also love Beautiful Taxonomy Filters and don’t want to stop using either!! lol.

    While I have you, any chance of AJAX Integration with Beautiful Taxonomy in the future? That would be awesome!

    Plugin Author Jonathandejong

    (@jonathandejong)

    Alright. Another solution you could do which is a bit more hassle is to disable select2 but then add your own select2 initialization code based on the version ACF uses (I think it’s the latest 3.x). That way you’d get it working great without needing to worry about updating BTF before ACF has updated and when ACF updates you can just switch back to the plugins own code.

    Thank you for the kind words, you shouldn’t need to stop using either ??

    By “my styling” do you mean extra CSS you’ve added yourself in the plugin setting?

    There’s been a plan to integrate AJAX for some time now. There’s some issues to it tho. that I’d have to run queries with each selection and part of me don’t like to force users a heavier than necessary plugin. But it will likely be an option to enable/disable AJAX.

    The main reason this hasn’t been introduced yet is due to me working on this as a hobby-project outside of two jobs, a family etc. etc. (you get it). So time is limited ??

    I had the same issue, but on the frontend.

    Adding this to your functions.php worked for me.
    This will deregister the existing select2 and register/enqueue the new.

    add_action( 'wp_enqueue_scripts', 'mgt_dequeue_stylesandscripts', 100 );
    function mgt_dequeue_stylesandscripts() {
            wp_dequeue_style( 'select2' );
            wp_deregister_style( 'select2' );
    
            wp_dequeue_script( 'select2');
            wp_deregister_script('select2');
    
            wp_enqueue_style("select2", "//cdnjs.cloudflare.com/ajax/libs/select2/4.0.0/css/select2.min.css");
            wp_enqueue_script("select2", "//cdnjs.cloudflare.com/ajax/libs/select2/4.0.0/js/select2.min.js", "", "", false);
    }
    Plugin Author Jonathandejong

    (@jonathandejong)

    Hi Standoutmedia,

    That’s another way to do it however please be advised that some things have changed in select2 from 3.x to 4.x so some features of ACF might not work properly if you “hard-change” the version.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Select2 COnflicting with ACF v5’ is closed to new replies.