Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Display page under my slug /map


r-a-y
Keymaster

@r-a-y

You might be missing a template action in your component.

This is how groups does it:
function groups_directory_groups_setup() {
global $bp;

if ( $bp->current_component == $bp->groups->slug && empty( $bp->current_action ) && empty( $bp->current_item ) ) {
$bp->is_directory = true;

do_action( 'groups_directory_groups_setup' );
bp_core_load_template( apply_filters( 'groups_template_directory_groups', 'groups/index' ) );
}
}
add_action( 'wp', 'groups_directory_groups_setup', 2 );

Also this might apply to you:
https://buddypress.org/community/groups/creating-extending/forum/topic/custom-plugin-hook-bp_setup_globals-is-not-fired/

Skip to toolbar