• 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

Different Feature Images on New Blog Posts

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 › Different Feature Images on New Blog Posts

This topic is: not resolved

Tagged: featured image

  • This topic has 4 replies, 2 voices, and was last updated 7 years, 11 months ago by pxforti.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • October 11, 2017 at 7:28 am #212413
    pxforti
    Participant

    Hi,

    I am updating my genesis theme and I want to use a different sized featured image on all NEW blogs Posts.

    My old featured images size was 100px wide. My new featured image size is 800px wide. As a result, I want to leave the old posts with the 100px wide featured image because the original image is 100px wide.

    I realize that I can change the genesis theme setting to use a different image size, but that changes the image size on all posts.

    I am trying some code that searches for posts newer than the August 1 and adds a different sized featured image to that post, but leaves the older post with the origianl 100px by 100px featured image.

    Here is an example of the code I have so far. It works, but it leaves the old 100px by 100px image on the new posts:

    add_action( 'genesis_entry_header', 'featured_post_image', 1 );
    function featured_post_image() {
    	global $post;
    	if (strtotime($post->post_date) >= strtotime('2017-08-01') and ( is_singular( 'post' ) or is_category() or is_home() ) )	{
    		the_post_thumbnail('large');
    	}
    }
    

    Thanks


    writeNowDesign
    WordPress and Ecommerce Website Design

    October 11, 2017 at 10:33 am #212417
    tarmadillo
    Participant

    When I echo $post->post_date on my site, I get the year, month, day, hour, min, seconds.

    try

    get_the_date('Y-m-d', $post->ID )

    edit: now that i think about it it, the original should still be greater than the string you gave, I'll keep looking.


    https://armadillowebdesign.com

    October 11, 2017 at 11:14 am #212420
    tarmadillo
    Participant

    I need to stop jumping to conclusions lol. I did this and it worked for me.

    function featured_post_image() {
        global $post;
        $day = 20170801;
        
        if ( intval(get_the_date('Ymd', $post->ID )) >= $day ) {
            the_post_thumbnail('large');
        } else {
            the_post_thumbnail('thumbnail');
        }
    }

    you may have to do more stuff to make it clickable but I don't know


    https://armadillowebdesign.com

    October 11, 2017 at 11:18 am #212421
    pxforti
    Participant

    Hi, Thanks for the reply. Both date functions work. The problem I am having is that I want to remove the genesis feature image on new post using
    remove_action( 'genesis_entry_content', 'genesis_do_post_image', 8 );
    But that removes all genesis featured images. I only want to remove the genesis featured image from the new post and instead use

    	add_action( 'genesis_before_loop', 'featured_post_image', 1 );
    	function featured_post_image() {
    		global $post;
    		//if (strtotime($post->post_date) >= strtotime('2017-08-01') and ( is_singular( 'post' ) or is_category() or is_home() ) )	{
    		$date = '2017-08-01';
    		if ( get_the_date('Y-m-d', $post->ID ) >= $date and ( is_singular( 'post' ) or is_category() or is_home() ) )	{
    			the_post_thumbnail('large');
    			echo get_the_date('Y-m-d', $post->ID );
    			remove_action( 'genesis_entry_content', 'genesis_do_post_image', 8 );
    		}
    	}
    
    

    writeNowDesign
    WordPress and Ecommerce Website Design

    October 11, 2017 at 11:19 am #212422
    pxforti
    Participant

    Thanks. That will work. Now I'll get the links in. I will post final code when I get it done.


    writeNowDesign
    WordPress and Ecommerce Website Design

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

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