Last active
January 3, 2016 21:49
-
-
Save messaoudi-mounir/8524437 to your computer and use it in GitHub Desktop.
Buddypress - Remove "All members" on Members directory ( javascript trick )
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
//add this code to functions.php | |
function bp_remove_allmembers_tab_js_script(){ ?> | |
<script type="text/javascript"> | |
var jq = jQuery; | |
jQuery(document).ready(function (jQuery) { | |
jq('#members-all').removeClass('selected').hide(); | |
jq('#members-personal').find('a').trigger('click'); | |
}); | |
</script> | |
<?php } | |
add_action('wp_footer', 'bp_remove_allmembers_tab_js_script'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment