• 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

Remove Featured Image From Posts Going Green Pro

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 › Remove Featured Image From Posts Going Green Pro

This topic is: not resolved
  • This topic has 5 replies, 3 voices, and was last updated 9 years, 2 months ago by CreativeKristi.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • October 8, 2013 at 7:40 am #65826
    Darren
    Member

    I would like to remove the featured image from showing up at the top of each post. I can do this easliy with CSS, but I would like to remove the actual html.

    October 8, 2013 at 8:01 am #65828
    Brad Dalton
    Participant

    You can remove the code from your child themes functions.php file on line 63:

    add_action( 'genesis_post_content', 'goinggreen_post_image_single', 5 );
    /**
     * Add featured image to single posts
     */
    function goinggreen_post_image_single() {
    	
    	if ( ! is_singular( 'post' ) )
    		return;
    	
    	$img = genesis_get_image( array( 'format' => 'html', 'size' => genesis_get_option( 'image_size' ), 'attr' => array( 'class' => 'post-image' ) ) );
    	printf( '<a href="&quot;%s&quot;" title="&quot;%s&quot;">%s</a>', get_permalink(), the_title_attribute( 'echo=0' ), $img );
    	
    }
    

    Tutorials for StudioPress Themes.

    October 8, 2013 at 8:10 am #65829
    Darren
    Member

    thanks for jumping in with the help! That code does not exist within my functions.php - I tried commenting this out, but it removed the featured image everywhere.

    //* Add featured image above the entry content
    add_action( 'genesis_entry_header', 'going_green_featured_photo', 5 );
    function going_green_featured_photo() {
    if ( is_page() || ! genesis_get_option( 'content_archive_thumbnail' ) )
    return;

    if ( $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' ) );
    }
    }

    October 8, 2013 at 6:45 pm #65902
    Brad Dalton
    Participant

    Please replace the default code with this code which will remove the image before your content on single posts however will not affect archive settings which you have configured under Genesis > Theme Settings > Content Archives.

    This is what i have added to the code for your solution:

    || is_single()
    

    Tutorials for StudioPress Themes.

    December 30, 2013 at 7:31 pm #82205
    CreativeKristi
    Member

    Is there a way to remove it from the main page only? I added the 'is_home' to the functions but when you click on a post the single post page appears over the header.


    I work at Creative Kristi Designs
    I play at Creative Kristi
    Affordable. Beautiful. Personal. Custom. Design for everyone.

    December 30, 2013 at 7:39 pm #82206
    CreativeKristi
    Member

    nevermind. The css was still overriding what I had done previously. All fixed


    I work at Creative Kristi Designs
    I play at Creative Kristi
    Affordable. Beautiful. Personal. Custom. Design for everyone.

  • Author
    Posts
Viewing 6 posts - 1 through 6 (of 6 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

© 2023 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