Skip to:
Content
Pages
Categories
Search
Top
Bottom

Divert user to BP main page?

  • Avatar of CriticalNed
    CriticalNed
    Participant

    @criticaltodd

    Users who login get diverted to the /wp-admin/ page. Is there a way to hack BP so they go to the root (main BP page)?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Avatar of Gogoplata
    gogoplata
    Participant

    @gogoplata

    Yep, open wp-login.php in a text editor and find “$redirect_to = admin_url();” and replace it with “$redirect_to = ‘/’;” then upload it to your server and you should be set.

    Avatar of CriticalNed
    CriticalNed
    Participant

    @criticaltodd

    perfect. thank you!!

    Avatar of CriticalNed
    CriticalNed
    Participant

    @criticaltodd

    for anyone else attempting this, I also had to delete these lines:

    // If the user can’t edit posts, send them to their profile.

    if ( !$user->has_cap(‘edit_posts’) && ( empty( $redirect_to ) || $redirect_to == ‘wp-admin/’ ) )

    I tried deleting “wp-admin” but somehow that wasn’t enough to force the redirect to the main BP page. Don’t know enough about PHP to figure out what I’m doing wrong there.

    Avatar of Gogoplata
    gogoplata
    Participant

    @gogoplata

    Glad to hear it worked, thanks for sharing!

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

You must be logged in to reply to this topic.