Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Changing Group tab display defaults

Thanks @r-a-y v.helpful

Here is a small improvement, because depending on the name of the group e.g. “home group” you could get a false positive here with the previous strpos function

`
<?php
function redirect_to_forum() {
global $bp;

$path = clean_url( $_SERVER );

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

if ( bp_is_group_home() && $bp->current_action == $bp->bp_options_nav )
bp_core_redirect( apply_filters( ‘bp_uri’, $bp->bp_options_nav) );
}
add_action( ‘wp’, ‘redirect_to_forum’ );
?>
`

Skip to toolbar