Skip to:
Content
Pages
Categories
Search
Top
Bottom

Home URL redirects to Members page


  • adrift_
    Participant

    @adrift_

    Hey,
    since I set the registration page (www.myurl.com/registration) as start page, my main url (www.myurl.com) links to the members page (www.myurl.com/members). I’d like my main url (Logo etc.) to link to the stream (www.myurl.com/stream).

    Did anyone have the same problem? Or any suggestions to solve this?

Viewing 5 replies - 1 through 5 (of 5 total)

  • Henry Wright
    Moderator

    @henrywright

    Are you logged in? If you visit /registration/ as a logged-in user, then you will be redirected to /members/. Setting your homepage to your registration page will mean you get redirected to /members/ when you visit your homepage (when logged-in).


    adrift_
    Participant

    @adrift_

    @henrywright Thanks for the fast reply! Yes , I am logged in. Is there a possibility to change the redirection to members, that it redirects to the stream?


    Henry Wright
    Moderator

    @henrywright

    The Theme My Login plugin is useful in handling redirection. Taken from the plugin’s feature list:

    Redirect users upon log in and log out based upon their role

    I’ve done this myself using the plugin and can confirm it works quite well with BuddyPress installed.


    adrift_
    Participant

    @adrift_

    Okay thanks, the plugin redirects after login or logout. My problem still is, that the logo and root URL link to the members page. Is there a solution for that (PHP would be okay)?


    Henry Wright
    Moderator

    @henrywright

    OK, in that case you could try something like this:

    function my_redirect() {
        // Bail if the user is not logged in.
        if ( ! is_user_logged_in() ) {
            return;
        }
        // Redirect users away from the homepage
        if ( is_front_page() || is_home() ) {
            bp_core_redirect( get_option( 'home' ) . '/stream/' );
        }
    }
    add_action( 'init', 'my_redirect', 1 );
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Home URL redirects to Members page’ is closed to new replies.
Skip to toolbar