• 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 edit functions.php to remove featured image above the entry content?

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 to edit functions.php to remove featured image above the entry content?

This topic is: not resolved

Tagged: aspire, entry-content

  • This topic has 6 replies, 4 voices, and was last updated 9 years, 6 months ago by erinholmes.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • June 15, 2016 at 2:12 pm #187604
    Posey
    Member

    Hi
    I am using the Aspire Pro theme.
    Can someone tell me how to remove/modify the "featured image above the entry content" code?

    I do want the featured image to show up on Archive pages but do not want that image above the entry content.
    I am looking at the code in the functions.php file. Here is what it says...

    //* Add featured image above the entry content
    add_action( 'genesis_entry_header', 'aspire_featured_photo', 5 );
    function aspire_featured_photo() {

    if ( is_attachment() || ! genesis_get_option( 'content_archive_thumbnail' ) )
    return;

    if ( is_singular() && $image = genesis_get_image( array( 'format' => 'url', 'size' => genesis_get_option( 'image_size' ) ) ) ) {
    printf( '<div class="featured-image">%s</div>', $image, the_title_attribute( 'echo=0' ) );
    }

    Thanks so much,
    ~ Posey

    http://radiantresumeservices.com
    June 15, 2016 at 10:55 pm #187647
    mrland
    Member

    This rather strange problem for me. quite hard, hope you soon have a new solution. Good luck


    Download free all the hottest games for Android here

    June 16, 2016 at 4:27 am #187665
    Victor Font
    Moderator

    Where do you want the image to appear? If you would prefer the featured image after the post title, change the add_action line to

    //* Add the featured image after post title
    add_action( 'genesis_entry_content', 'aspire_featured_photo' );

    If that doesn't do what you want, tell us where you want the image.


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    July 21, 2016 at 8:23 am #189901
    erinholmes
    Member

    This solution seems to put the image at the end of the pages and posts. Could someone pinpoint the issue. I'm not comfortable with php. Here is the code:

    //* Add the featured image after post title
    add_action( 'genesis_entry_content', 'aspire_featured_photo' );
    function aspire_featured_photo() {

    if ( is_attachment() || ! genesis_get_option( 'content_archive_thumbnail' ) )
    return;

    if ( is_singular() && $image = genesis_get_image( array( 'format' => 'url', 'size' => genesis_get_option( 'image_size' ) ) ) ) {
    printf( '<div class="featured-image">%s</div>', $image, the_title_attribute( 'echo=0' ) );
    }

    }

    July 21, 2016 at 8:42 am #189904
    erinholmes
    Member

    I think the solution involves removing the entry image from displaying on pages. On posts it looks/works just fine.

    July 21, 2016 at 9:06 am #189906
    erinholmes
    Member

    I commented this all out, and it removes the entry image on pages and posts. However, is there a way to edit this so that entry images show "only" on posts, and not pages?

    //* Add featured image above the entry content
    //add_action( 'genesis_entry_header', 'aspire_featured_photo', 5 );
    //function aspire_featured_photo() {

    //if ( is_attachment() || ! genesis_get_option( 'content_archive_thumbnail' ) )
    return;

    //if ( is_singular() && $image = genesis_get_image( array( 'format' => 'url', 'size' => genesis_get_option( 'image_size' ) ) ) ) {
    printf( '<div class="featured-image">%s</div>', $image, the_title_attribute( 'echo=0' ) );
    //}

    //}

    July 21, 2016 at 9:09 am #189908
    erinholmes
    Member

    Nevermind. I'm back to square one. Commenting this all out really messes with the homepage. The way entry posts are set up on the majority of these studiopress themes seems sort of backwards. I'm not sure why displaying entry posts on pages is necessary.

  • Author
    Posts
Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘General Discussion’ 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