Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re-direct to other page?

  • @minniek

    Member

    Hello!

    I want to re-direct my visitors depending on if they are logged in or not. I have tried using the BP Profile as Homepage Plugin, because the description for it is what I want to do- but instead of taking my user to their own profile page they end up in the Member catalogue.

    Anyone knows how to do a simple redirect like:

    redirect to register page

    I searched this topic and found some answers, but I don’t really understand them :( So in simple words or a sample script?

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • @minniek

    Member

    The code got lost…

    `
    redirect to register page
    `

    @aces

    Participant

    Couldn’t you use something like travel-junkie’s walled garden technique:
    `
    function sh_walled_garden()
    {
    global $bp;
    if( bp_is_register_page() || bp_is_activation_page() || bp_is_page( BP_FORUMS_SLUG ) || bp_is_page( BP_GROUPS_SLUG ) )
    return;

    if( ! bp_is_blog_page() && ! is_user_logged_in() )
    bp_core_redirect( bp_get_signup_page() );
    }

    add_action( ‘bp_init’, ‘sh_walled_garden’ );
    `
    This goes in bp-custom.php and hides members and activity from those not logged in but enables forums and groups for everyone. It can also be customised…..

    Chris Clayton discussed a similar method here

    Having different menus for logged in users is discussed here – also see here

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Re-direct to other page?’ is closed to new replies.
Skip to toolbar