Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] Display BuddyPress components on WP Author page

  • @aronprins

    Participant

    Hey all,Im trying to display the member-header.php in the wordpress author page but it gives me “not recently” active when the user is visited. I’d also like to display a profile field in the sidebar.

    Anyone knows how this can be accomplished?
    Cheers, Aron

Viewing 12 replies - 1 through 12 (of 12 total)
  • @karmatosed

    Moderator

    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.

    @aronprins

    Participant

    Thanks for your feedback, ill see if i can make this work 🙂
    Cheers, Aron

    @karmatosed

    Moderator

    Cool – just respond back if run into any issues and will see about helping to get back on track.

    @aronprins

    Participant

    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. )

    @karmatosed

    Moderator

    Are you passing a userid or getting the userid? It would need you to as I said put a value in $userid.

    @modemlooper

    Moderator

    Post some code you are using so we can see what you are trying to do

    @aronprins

    Participant

    Will do @modemlooper when i get home! Thanks!

    @karmatosed

    Moderator

    @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

    @aronprins

    Participant

    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

    @karmatosed

    Moderator

    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?

    @rogercoathup

    Participant

    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.

    @aronprins

    Participant

    Thanks @rogercoathup – that fixed my problem!

    Cheers, Aron

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘[Resolved] Display BuddyPress components on WP Author page’ is closed to new replies.
Skip to toolbar