• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

How Keep original Author Avatar Square (not cropped round)

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › How Keep original Author Avatar Square (not cropped round)

This topic is: resolved

Tagged: avatar

  • This topic has 2 replies, 2 voices, and was last updated 9 years, 11 months ago by m31.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • February 11, 2016 at 7:30 pm #178842
    m31
    Member

    Hello,

    I’m modifying the functions.php file for News Pro Theme to display author avatar between post title and entry content. I’m using code from carriedils.com, posted below, to accomplish this.

    The problem I would like to solve is that the avatar is cropped into a round circle, I would like to retain the original square format of the avatar. Thank you.

    /**
    * Add author avatar to post info output
    *
    * @uses get_avatar() <http://codex.wordpress.org/Function_Reference/get_avatar&gt;
    * @uses get_author_posts_url() <http://codex.wordpress.org/Function_Reference/get_author_posts_url&gt;
    */
    add_filter( 'genesis_post_info', 'cd_post_info_filter' );
    function cd_post_info_filter( $post_info ) {
    // get author details
    $entry_author = get_avatar( get_the_author_meta( 'email' ), 64 );
    $author_link = get_author_posts_url( get_the_author_meta( 'ID' ) );
    // build updated post_info
    $post_info = sprintf( '<span class="author-avatar">%s</span>', $author_link, $entry_author );
    $post_info .= '[post_date] by [post_author_posts_link] [post_comments] [post_edit]';
    return $post_info;
    }

    February 11, 2016 at 11:18 pm #178848
    Brad Dalton
    Participant

    Look for CSS in your style.css file which uses the .avatar class to make the image round. Its not cropped round.


    Tutorials for StudioPress Themes.

    February 14, 2016 at 11:06 pm #179053
    m31
    Member

    Brad,

    Thanks so much, you pointed me in the right direction and I was able to figure out how to modify the avatar class within the sites style.css. Even kept some border radius to round the corners of the square, which had a look I liked even better, below this reply is the snippet.

    In addition, it gave me insight in how to control some other features. Much appreciated!

    -Jason

    .avatar {
    border-radius: 15%;
    float: left;
    padding: 3px;
    }

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘How Keep original Author Avatar Square (not cropped round)’ is closed to new replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble