Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Make your own custom BuddyPress page


Lriggle
Participant

@lriggle

21CDB’s code works fine with my theme. I’d like my custom page to be in a sub-folder instead of in my root directory, though.

define('CS_INTUITION_SLUG', 'intuition');

function show_intuition_page()
{
bp_core_add_root_component(CS_INTUITION_SLUG);
}
add_action( 'plugins_loaded', 'show_intuition_page', 2 );

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

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

When I remove the intuition.php file from my root directory, and make an intuition directory with an index.php in it, it doesn’t seem to work (I get 404’s). If I try and change what the value of the slug and the template are as well, I still get 404’s.

Ideas?

Skip to toolbar