• 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 to show avatar on single posts ONLY!

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 › Design Tips and Tricks › How to show avatar on single posts ONLY!

This topic is: resolved
  • This topic has 2 replies, 2 voices, and was last updated 9 years, 6 months ago by ronaldallanp.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • July 10, 2016 at 11:33 am #189217
    ronaldallanp
    Member

    I have purchased genesis magazine pro theme. I have successfully put authors avatar in single posts via "genesis_entry_header" Hook using this code
    <?php echo get_avatar( get_the_author_email(), '64' ); ?>

    However, author avatar is also showing in blog page

    I want to show only the author avatar in single posts and hide it in blog posts. How can I do that?

    Sitelink: androidscrib.com


    Androids Crib – Tips, How To Guide Tutorials, News, Reviews and many more!

    https://androidscrib.com
    July 17, 2016 at 8:19 am #189693
    Christoph
    Member

    Hi,

    write a conditional statement to only show the avatar
    if (is_single())

    or the other way around, to not show it if (! is_single() )


    https://www.christophherr.com | Genesis Customizations | Buy me a coffee

    July 27, 2016 at 7:30 am #190290
    ronaldallanp
    Member

    Thank you Christoph for your reply but I already solved this on my own on the same date when I published this thread using this code

    <?php {
    
    if (is_single() ) { echo get_avatar( get_the_author_email(), '64' ); }
    }
    ?>

    I put it in "genesis_entry_header Hook" then checked "Execute PHP on this hook?"

    I just put the solution to be the source if ever there are also users who want to add avatar on their posts.

    Thanks again for the support.


    Androids Crib – Tips, How To Guide Tutorials, News, Reviews and many more!

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and 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