Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function redirect_to_forum() {
- global $bp;
- $path = clean_url( $_SERVER['REQUEST_URI'] );
- $path = apply_filters( 'bp_uri', $path );
- if ( bp_is_group_home() && strpos( $path, $bp->bp_options_nav['groups']['home']['slug'] ) === false )
- bp_core_redirect( $path . $bp->bp_options_nav['groups']['forum']['slug'] . '/' );
- }
- add_action( 'wp', 'redirect_to_forum' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement