Created
January 30, 2020 09:09
-
-
Save mahfelwp/dede9b4f7e392104c1e687198f5b389c to your computer and use it in GitHub Desktop.
fix select 2 on theme that conflict with youzer plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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