I am trying to dynamically display the name of the page a user is on in Buddypress. For example if you are on the Notifications page, I need a variable that displays “Notifications”.
I’m looking for something that works such as the_title(); for WordPress.
This might do the trick..
if you want the whole code for the tag for your header.php file then you can use the code given below.(You can always customize as per your need)
That’s my site’s code as it is so you might want to customize for you
Check out the BuddyPress Template Tag Reference
There you will find functions such as
bp_is_messages_conversation()
andbp_is_change_avatar()
These can be used like this:
Regarding notifications, I’m not sure if there is a ‘wrapper’ function available but you could do something like this:
or: