Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Changing Group tab display defaults

@defunctlife

Participant

This function creates an infinite loop if the MOD didn’t enable discussion forums for their group.

Updated code to check for that:

`function redirect_to_forum() {
global $bp;

$path = clean_url( $_SERVER );

$path = apply_filters( ‘bp_uri’, $path );

if ( bp_is_group_home() && strpos( $path, $bp->bp_options_nav ) === false ) {
if( $bp->bp_options_nav )
bp_core_redirect( $path . $bp->bp_options_nav . ‘/’ );
}
}
add_action( ‘wp’, ‘redirect_to_forum’ );`

Skip to toolbar