Created
May 7, 2022 03:54
-
-
Save KaineLabs/7ce72c769a5e91bb4a4e83248117fd5d to your computer and use it in GitHub Desktop.
BuddyPress - Make custom tab behave as Directory
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 | |
/** | |
* BuddyPress - Make custom tab behave as Directory. | |
*/ | |
add_filter( 'bp_is_directory', 'yzc_make_custom_tab_as_directory' ); | |
function yzc_make_custom_tab_as_directory( $retval ) { | |
if ( bp_current_component() == 'custom_tab_slug' ) { | |
return true; | |
} | |
return $retval; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment