Skip to:
Content
Pages
Categories
Search
Top
Bottom

Created profile link redirects members to homepage

  • @jpveneracion

    Member

    Hello sirs and madams,

    I want to seek help regarding the extra profile link i made. Administrators can see the content of the link correctly but regular members can.

    1. I created the folder `scores` under `memberssingle`
    2. placed needed files in scores directory
    3. placed this in bp-custom:

    `function sv_xprofile_xtra_nav()
    {
    global $bp;

    $profile_link = $bp->loggedin_user->domain . $bp->profile->slug . ‘/’;

    bp_core_new_nav_item( array( ‘name’ => __( ‘Scores’, ‘scores’ ), ‘slug’ => ‘scores’, ‘parent_url’ => $profile_link, ‘parent_slug’ => $bp->profile->slug, ‘screen_function’ => ‘sv_screen_display_scores’, ‘position’ => 99 ) );
    }
    add_action( ‘xprofile_setup_nav’, ‘sv_xprofile_xtra_nav’ );

    function sv_screen_display_scores()
    {
    if ( !bp_is_home() && !is_site_admin() )
    return false;

    bp_core_load_template( apply_filters( ‘sv_xprofile_template_display_scores’, ‘members/single/scores/song-score’ ) );
    }`

    As i said clicking the scores tab if the logged in user is an admin works fine… otherwise they get redirected to the homepage….

    Thank you guys!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Created profile link redirects members to homepage’ is closed to new replies.
Skip to toolbar