How to get direct link to notifications in profile?

  • Participant
    Level: Initiated
    Posts: 12
    Siyah on #10820

    Hi there,

    On the homepage, I want a link that directly sends me to the notifications in my profile. How can I do this? Do you have a snippet / shortcode for this?

    I would really appreciate the help.

  • Keymaster
    (BuddyDev Team)
    Posts: 24338
    Brajesh Singh on #10822

    You can use the following code

    $link = trailingslashit( bp_core_get_user_domain( $user_id ) .  bp_get_notifications_slug() );

    Where $user_id is the id of the user.

    If you are looking for the logged in user, you can use this

    $link = trailingslashit( bp_loggedin_user_domain( ) .  bp_get_notifications_slug() );

    Hope that helps.

You must be logged in to reply to this topic.

This topic is: not resolved