Skip to content

Instantly share code, notes, and snippets.

@mahfelwp
Created January 30, 2020 09:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mahfelwp/dede9b4f7e392104c1e687198f5b389c to your computer and use it in GitHub Desktop.
Save mahfelwp/dede9b4f7e392104c1e687198f5b389c to your computer and use it in GitHub Desktop.
fix select 2 on theme that conflict with youzer plugin
<?php
function select2_fix() {
if ( is_buddypress() ) { ?>
<script>
jQuery( document ).ready( function($) {
$('select').select2('destroy');
});
</script>
<?php }
}
add_action( 'wp_footer' , 'select2_fix', 999 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment