Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Make your own custom BuddyPress page


21cdb
Participant

@21cdb

Thanks to Travel-Junkie it is now working for me.

Here is what i put in my bp-custom.php (not tested in the themes functions.php)

define('BP_EXAMPLE_SLUG', 'features');

function example_page_setup_root_component()
{
bp_core_add_root_component( BP_EXAMPLE_SLUG );
}
add_action( 'plugins_loaded', 'example_page_setup_root_component', 2 );

function bp_show_example_page() {
global $bp, $current_blog;

if ( $bp->current_component == BP_EXAMPLE_SLUG && $bp->current_action == '' ) {
// The first variable here must match the name of your template file below
bp_core_load_template( 'features', true );
}
}
add_action( 'wp', 'bp_show_example_page', 2 );

It is for a features.php page which is in the root directory of the child theme.

Skip to toolbar