Created
September 5, 2018 19:35
-
-
Save KaineLabs/96a4719237b65a017f1cdd110ed38446 to your computer and use it in GitHub Desktop.
Disable Youzer template on the profile 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 profile page ! | |
function yzc_disable_profile_template() { | |
if ( bp_is_user() ) { | |
remove_action( 'bp_init', 'yz_bp_overload_templates' ); | |
remove_filter( 'template_include', 'yz_bbp_youzer_template', 999 ); | |
} | |
} | |
add_action( 'bp_init', 'yzc_disable_profile_template', 9 ); |
So i found the issue and here is the updated version of this to work perfectly fine.
// Disable Youzer template on the profile page !
function yzc_disable_profile_template() {
if ( bp_is_user() ) {
remove_action( 'bp_init', 'youzify_bp_overload_templates'); <== This line is changed in the core theme when i read the code
remove_filter( 'template_include', 'yz_bbp_youzer_template', 999 );
}
}
add_action( 'bp_init', 'yzc_disable_profile_template', 9 );
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This hook is not working. I tried to add it to the functions.php of my active theme but its not working. Can you please guide me on it.
As I want to use another profile page for member profile that i have created with the help of the Buddy Builder and Elementor.
Thanks & Regards Sheraz Razzaq