Help With Displaying Additional Data On Profiles
Posted: September 16th, 2011, 4:48 am
Hi Guys,
What I am trying to achieve is to display additional data on members buddypress profile pages.
I am using the code below in my themes functions file:
The problem is, that this displays the logged in users details as opposed the members profile that is being displayed. For example, I am 'admin', looking at members 'fayes' profile. Instead of 'fayes' additional details being echoed, I get mine.
Any help please?
Thanks
Rob
What I am trying to achieve is to display additional data on members buddypress profile pages.
I am using the code below in my themes functions file:
- Code: Select all
function ShowInfo() {
echo "Username: " . S2MEMBER_CURRENT_USER_LOGIN . "<br>";
echo "Membership Level: " . S2MEMBER_CURRENT_USER_ACCESS_LABEL . "<br>";
echo "Registration IP: " . S2MEMBER_CURRENT_USER_REGISTRATION_IP . "<br>";
echo "Current IP: " . S2MEMBER_CURRENT_USER_IP . "<br>";
echo "Logins: " . S2MEMBER_CURRENT_USER_LOGIN_COUNTER . "<br>";
}
add_action( 'bp_before_member_header_meta', 'ShowInfo' ); // show additional profile info
The problem is, that this displays the logged in users details as opposed the members profile that is being displayed. For example, I am 'admin', looking at members 'fayes' profile. Instead of 'fayes' additional details being echoed, I get mine.
Any help please?
Thanks
Rob