Remove Featured Image From Posts Going Green Pro

Community Forums Forums General Discussion Remove Featured Image From Posts Going Green Pro

This topic is: not resolved

This topic contains 5 replies, has 3 voices, and was last updated by  CreativeKristi 8 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #65826

    Darren
    Participant
    Post count: 14

    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.

    #65828

    braddalton
    Participant
    Post count: 9399

    You can remove the code from your child themes functions.php file on line 63:
    [php]
    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( ‘%s‘, get_permalink(), the_title_attribute( ‘echo=0′ ), $img );

    }
    [/php]


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #65829

    Darren
    Participant
    Post count: 14

    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′ ) );
    }
    }

    #65902

    braddalton
    Participant
    Post count: 9399

    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:
    [php]
    || is_single()
    [/php]


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #82205

    CreativeKristi
    Participant
    Post count: 23

    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.

    #82206

    CreativeKristi
    Participant
    Post count: 23

    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.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.