Skip to:
Content
Pages
Categories
Search
Top
Bottom

Redirect from mentions to default activity tab


  • ljmac
    Participant

    @ljmac

    Hi,

    I have a Facebook-style wall set up as the default tab for activity on users’ BuddyPress profiles. This makes some of the other subnavs redundant, so I’ve hidden them. However, when a user gets mentioned, the notification sends them to the Mentions tab (which I’ve also hidden). How can I redirect them to their wall (/members/%username%/activity/)? BuddyPress’ dynamic URLs make this much less straightforward than usual.

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

  • danbp
    Moderator

    @danbp

    Maybe you could adjust the email token ?

    Email Tokens

    Or try one of the snippets mentionned in this discussion
    https://buddypress.org/support/topic/redirect-users-to-their-notifications-after-login/


    ljmac
    Participant

    @ljmac

    Thanks for the quick response! I’ll look into your suggestions tomorrow.


    ljmac
    Participant

    @ljmac

    Unfortunately none of these are quite what I’m after – the following code comes close, but I don’t want a login redirect – just a standard redirect from /members/%username%/activity/mentions/ to /members/%username%/activity/. How can I modify this code to achieve my desired outcome?

    function jessicana_redirect_page( $redirect_to, $request, $user ) {
        $redirect_to = bp_core_get_user_domain($user->ID) . 'notifications/';
        return $redirect_to;
    }
    add_filter('login_redirect', 'jessicana_redirect_page', 11, 3);
Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar