Search code examples
wordpresspluginsslugbuddypress

buddypress page slug for user pages


My theme does not support notification alert so i used this code to show the notification count:

bp_notifications_get_unread_notification_count(bp_loggedin_user_id());

But it is not clickable, can someone please help me with the link that i can paste inside the

href = ” ”

so that it can redirect them to their notification page slug ?

currently it is http://www.example.comh/members/rvnamb/notifications/

how can i replace rvnamb with the currently logged in user id ? i searched a lot but could not find a solution


Solution

  • Try:

    <a href="<?php echo bp_loggedin_user_domain() ?>notifications/">Notifications</a>