Skip to content

Instantly share code, notes, and snippets.

@KaineLabs
Last active October 21, 2020 00:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KaineLabs/7a2e8d9f84d463c41fce535d0f8bcd01 to your computer and use it in GitHub Desktop.
Save KaineLabs/7a2e8d9f84d463c41fce535d0f8bcd01 to your computer and use it in GitHub Desktop.
Disable Youzer Template On The Members Directory Page !
<?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