Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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