Skip to:
Content
Pages
Categories
Search
Top
Bottom

Replace avatar with post thumbnail in widget


  • breedlove
    Participant

    @breedlove

    Hi, Is there way I can replace the avatar on the blog widget with a thumnail form the post (if one has been uploaded) instead.

    Thanks, B.

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

  • breedlove
    Participant

    @breedlove

    anyone?


    Burt Adsit
    Participant

    @burtadsit

    Not sure what you are asking. You want to replace the blog avatar in what location with what instead?


    breedlove
    Participant

    @breedlove

    hi, The blog widget that displays the latest posts along with the avatar of the author is the one I’m talking about.


    Burt Adsit
    Participant

    @burtadsit

    Oh, I see the ‘recent posts’ widget. Ok.

    You’ll have to change line 36 in bp-blogs-widgets.php which looks like this now:


    <a href="<?php echo bp_post_get_permalink( $post, $post->blog_id ) ?>" title="<?php echo apply_filters( 'the_title', $post->post_title ) ?>"><?php echo bp_core_get_avatar( $post->post_author, 1 ) ?></a>


    That spot at the end there <?php echo bp_core_get_avatar( $post->post_author, 1 ) ?> is the author’s avatar. Replace that code with something that detects an image thumbnail if it exists and switch between the thumbnail and the author avatar.


    breedlove
    Participant

    @breedlove

    Thanks for that. I’ll have a bash later.

    How about if I wanted to get a custom field from another blog? How would I pull that field?

    field is syndication_permalink

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Replace avatar with post thumbnail in widget’ is closed to new replies.
Skip to toolbar