Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

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/7ce72c769a5e91bb4a4e83248117fd5d to your computer and use it in GitHub Desktop.
Save KaineLabs/7ce72c769a5e91bb4a4e83248117fd5d to your computer and use it in GitHub Desktop.
BuddyPress - Make custom tab behave as Directory
<?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