Skip to:
Content
Pages
Categories
Search
Top
Bottom

Author’s photo on index page

  • Avatar of Dixyantar
    dixyantar
    Member

    @dixyantar

    I am using the latest version of buddypress can someone tell me how can I show the author’s photo near the title of a post on the index page and on the post page.

    The site I am building doesnt allow users to create their own blogs , but they can post on several of pre-created blogs.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Avatar of Burt Adsit
    Burt Adsit
    Participant

    @burtadsit

    Howdy, looking around in the bp code I found this for ya.

    bp_post_author_avatar(). It’s in the bp-core-templatetags.php file. Looks like it is only useful inside of a wordpress post loop.

    function bp_post_author_avatar() {

    global $post;

    if ( function_exists(‘bp_core_get_avatar’) ) {

    echo apply_filters( ‘bp_post_author_avatar’, bp_core_get_avatar( $post->post_author, 1 ) );

    } else if ( function_exists(‘get_avatar’) ) {

    get_avatar();

    }

    }

    I don’t see any references to *bp* using this function at all for it’s own purposes. Looks like it was built special for you. :)

    This what you’re looking for?

    Avatar of Dixyantar
    dixyantar
    Member

    @dixyantar

    Thanks Buddy. Exactly what I was looking for. Anyways thanks. But this does not display the thumbnail .. does it?

    Avatar of Burt Adsit
    Burt Adsit
    Participant

    @burtadsit

    I dunno. I’ve never used that function. Try it out and see what it does.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Author’s photo on index page’ is closed to new replies.