Skip to:
Content
Pages
Categories
Search
Top
Bottom

Redirecting to activity PHP help

  • I’ve customized the profile page default tab and item-nav order so that Profile is above Activity.

    This is because I want everony else to see a person’s profile first, not their activity, BUT I want people to see their OWN activity not their own profile.

    Basically, if `( bp_is_my_profile() )` then have it redirect to the activity else have it redirect to the profile?

    So how do I edit this to make it work:
    `function bp_profile_homepage()
    {
    global $bp;
    $selected_role = get_option(‘bpahp_role_choice’);
    if($selected_role == ”)
    {
    if(is_user_logged_in() && bp_is_front_page())
    {
    wp_redirect( $bp->loggedin_user->domain );
    }
    }
    else
    {
    if(!current_user_can($selected_role) && bp_is_front_page())
    {
    wp_redirect( $bp->loggedin_user->domain );
    }
    }
    }`

    I posted this on the wordpress forums. I don’t know much about PHP and could really use some help.

    http://wordpress.org/support/topic/plugin-bp-profile-as-homepage-redirecting-to-the-activity

  • The topic ‘Redirecting to activity PHP help’ is closed to new replies.
Skip to toolbar