Just to be clear, what you are trying to do is display like the user avatar and other details on the author page? You can’t just use member-header as that looks at the ‘current user’. In this case the author page doesn’t have the right information for those calls to work.
What I’d suggest is you get the userid and use functions like these:
bp_core_fetch_avatar( array( 'item_id'=>$userid, 'width'=>150));
echo bp_core_get_username($userid);
bp_last_activity( $userid );
That way you’re creating the member-header yourself. You could even have a template part to do this and just call that in the right place.
Thanks for your feedback, ill see if i can make this work 🙂
Cheers, Aron
Cool – just respond back if run into any issues and will see about helping to get back on track.
When i use those codes on a author template, nothing shows 🙁
Here’s my main problem, i run the detube theme from themeforest – and i want to integrate recent uploads and likes in to one of the bp profile pages. This info is normally shown in an author page, thus it knows what author uploads to display.
When i put this code in the buddypress profile it doesnt ”see” what author should be shown, and displays the general recent uploads and likes.
How can i ”trick” a piece of code the think that its on an author page but its on a bp page… ( did all that make sense? )
Thanks so much for your help!
Cheers, Aron
PS: http://demo.dedepress.com/detube/author/cloud/ ( im talking about recently added & liked videos, thats what i need in the bp profile pages. )
Are you passing a userid or getting the userid? It would need you to as I said put a value in $userid.
Post some code you are using so we can see what you are trying to do
Will do @modemlooper when i get home! Thanks!
@modemlooper is right seeing would be great at this point, thanks. Rather than pasting it all trying using Gist for example. https://gist.github.com
Hey @karmatosed & @modemlooper,
Once again thanks for the generous offer of support, you guys rock!
Here’s a link to the gist: https://gist.github.com/4165936
The // Recently Added part & // Liked Videos part is what i need to show on a buddypress profile page.
I don’t need the profile fields page so ive used that one thus far.
Cheers,
Aron
Where is: dp_get_queried_user_id? I see you’re calling it but what does it contain? Can you perhaps do an echo to see if you’re indeed showing the userid?
If it’s on the members page, use a bp function to get the user_id, e.g. bp_displayed_user_id(), and pass that to your loops.
The call you are using to get the queried_user_id is not going to work on a BuddyPress member page.
Thanks @rogercoathup – that fixed my problem!
Cheers, Aron