WordPress.org

Ready to get started?Download WordPress

Forums

Co-Authors Plus
[resolved] Swap gravatar for featured image (6 posts)

  1. Lee Rickler
    Member
    Posted 1 year ago #

    On a current set-up all authors are using featured image as their site wide avatar.

    How can I implement this into the plugin?

    TIA.

    http://wordpress.org/extend/plugins/co-authors-plus/

  2. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 1 year ago #

    Where is the featured image coming from? Can you share the code you're using?

  3. Lee Rickler
    Member
    Posted 1 year ago #

    It's the standard WP featured image.

    ideally add a call in functions.php:
    add_image_size( 'author-avatar', 30, 30, true );

    and then in the page itself:
    <?php if ( has_post_thumbnail() ) { the_post_thumbnail('author-avatar'); } ?>

    for example.

  4. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 1 year ago #

    Sorry, I'm not following exactly. Are you then setting the author avatar on a post by post basis? How would you like to incorporate the plugin?

  5. Lee Rickler
    Member
    Posted 1 year ago #

    Correct - Standard featured image on a post x post basis - I know it's not the conventional way but it's a client request to build it this way.

    So, my question is, where your plugin is concerned, is there anyway to swap out the gravtar icon with a posts featured image?

    Thanks.

  6. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 1 year ago #

    So, my question is, where your plugin is concerned, is there anyway to swap out the gravtar icon with a posts featured image?

    If you're referring to the gravatar icon that appears in the admin when you're assigning the coauthor, no. Not without some hacky JavaScript.

    Use of get_avatar() on the frontend can be filtered to use the featured image associated with the post though.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic