Last active
October 21, 2020 00:58
-
-
Save KaineLabs/7a2e8d9f84d463c41fce535d0f8bcd01 to your computer and use it in GitHub Desktop.
Disable Youzer Template On The Members Directory Page !
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 | |
// Disable Youzer template on the members directory page ! | |
function yzc_disable_members_directory_template() { | |
if ( bp_is_members_directory() ) { | |
remove_filter( 'template_include', 'youzer_template', 99999 ); | |
remove_action( 'bp_init', 'yz_bp_overload_templates' ); | |
remove_filter( 'template_include', 'yz_bbp_youzer_template', 999 ); | |
add_filter( 'yz_deregister_bp_styles', '__return_false' ); | |
} | |
} | |
add_action( 'bp_init', 'yzc_disable_members_directory_template', 9 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment