Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to get the last post's avatar?

  • @gerikg

    Member

    I’m trying to get the avatar to show on the front page.

    I tried post_author_avatar_link() and get_avatar(get_post_author_id()) neither works. Suggestions?

Viewing 5 replies - 1 through 5 (of 5 total)
  • @takster

    Member

    let us know if you have any luck, I’m trying to display the thread starters avatar in place of the last poster name on the mainpage and having no joy so far. I’m using user photo plugin.

    @gerikg

    Member

    okay it’s something like bb_get_avatar(**topic last poster ID**) but how do you get the last poster’s ID???

    To get the name is topic_last_poster() but ID, anyone?

    @nuprn1

    Member

    bb_get_avatar( $topic->topic_last_poster, '16')

    @gerikg

    Member

    Thanks but I got nothing, no result. on front-page.php

    @gerikg

    Member

    Okay I added echo and it works <?php echo bb_get_avatar( $topic->topic_last_poster, '16');?>

    16 = is the size (in px) of the avatar you want for people who want to know.

    Thank you!

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Skip to toolbar