How to branch pages
-
Is there a function to branch pages?
Currently I am supplementing that function with the following code.
$arr = explode( '/', $_SERVER['REQUEST_URI'] ); if ( isset($arr[1]) && $arr[1] === 'members' ) : if( is_user_logged_in() ) : if( bp_loggedin_user_id() == bp_displayed_user_id() ) : if( ( $arr[3] === '' || $arr[3] === 'activity' || $arr[3] === 'profile' || $arr[3] === 'following' || $arr[3] === 'followers' ) && $arr[4] != 'following' && isset($arr[3]) ) : echo 'hello'; elseif( $arr[3] === 'forums' ) : echo 'hello'; elseif( $arr[3] === 'bp-messages' || $arr[3] === 'settings' || $arr[3] === 'notifications' || $arr[3] === 'following' ) : echo 'hello'; endif; else: if( ( $arr[3] === '' || $arr[3] === 'activity' || $arr[3] === 'profile' || $arr[3] === 'following' || $arr[3] === 'followers' ) && isset($arr[3]) ) : echo 'hello'; elseif( $arr[3] === 'forums' && isset($arr[3]) ) : echo 'hello'; endif; endif; else: echo 'guest'; endif; endif;
But It’s not cool..
Please inform me if you have a better method to solve the problem than the one previously mentioned.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- You must be logged in to reply to this topic.