Re: loading templates problem
I finally found out.
Maybe this should be added to the doc ?
I forget to add those functions :
function component_force_buddypress_theme( $template ) {
global $bp;
if ( $bp->current_component == $bp->component->slug && empty( $bp->current_action ) ) {
$member_theme = get_site_option( 'active-member-theme' );
if ( empty( $member_theme ) )
$member_theme = 'bpmember';
add_filter( 'theme_root', 'bp_core_filter_buddypress_theme_root' );
add_filter( 'theme_root_uri', 'bp_core_filter_buddypress_theme_root_uri' );
return $member_theme;
} else {
return $template;
}
}
add_filter( 'template', 'component_force_buddypress_theme', 1, 1 );
function component_force_buddypress_stylesheet( $stylesheet ) {
global $bp;
if ( $bp->current_component == $bp->component->slug && empty( $bp->current_action ) ) {
$member_theme = get_site_option( 'active-member-theme' );
if ( empty( $member_theme ) )
$member_theme = 'bpmember';
add_filter( 'theme_root', 'bp_core_filter_buddypress_theme_root' );
add_filter( 'theme_root_uri', 'bp_core_filter_buddypress_theme_root_uri' );
return $member_theme;
} else {
return $stylesheet;
}
}
add_filter( 'stylesheet', 'component_force_buddypress_stylesheet', 1, 1 );