• 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

Change size of Featured Image on Archives page 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 › Change size of Featured Image on Archives page only

This topic is: not resolved

Tagged: archives, category archives, featured image, genesis

  • This topic has 6 replies, 2 voices, and was last updated 9 years, 9 months ago by senordeer.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • March 7, 2016 at 4:57 pm #180835
    senordeer
    Member

    Hello. I was wondering if there is a way to change the size of the Featured Image only on Archives pages. On homepage of blog:

    Cass Travels

    I have the Featured Image set to be full size (in Genesis theme settings - Content Archives). However, I would like to show a smaller thumbnail, aligned left, on any archive pages. Of course if I make this change in the theme settings, it will also affect the post on the homepage. I know how to show more posts in a category than on the homepage, but it would be great to be able to change size of Featured Image as well as alignment on category archives pages:

    http://casstravels.com/category/destinations/europe/england-europe/

    Thanks!

    http://casstravels.com
    March 7, 2016 at 5:09 pm #180841
    ᴅᴀᴠɪᴅ
    Member

    Not without writing code.

    One way would be to have the Genesis settings to how you want it to appear on the archive pages, not the home page, then for the home page, create a seperate page template which switches out the default images and replaces them with the small thumbnail ones that you need.

    To do this you would create a file in your child theme folder named home.php (if it doesn't exist) and add this;

    <?php
    /**
     * This file controls the posts page
     */
    
    //* Remove default featured image from posts page and replace with thumbnail.
    remove_action( 'genesis_entry_content', 'genesis_do_post_image', 8 );
    add_action( 'genesis_entry_content', 'child_theme_add_thumbnail_image', 8 );
    function child_theme_add_thumbnail_image() {
    
    	$image_args = array(
    		'size' => 'thumbnail',
    		'attr' => array(
    			'class' => 'alignleft post-image',
    		),
    	);
    
    	genesis_image( $image_args );
    }
    
    genesis(); 

    I love helping creative entrepreneurs build epic things with WP & Genesis.

    Follow on Twitter

    March 7, 2016 at 5:34 pm #180848
    senordeer
    Member

    David wow thanks so much for the quick response. So if I set the Content Archives theme settings to how I want the category archives to appear (small image, align left) but I want the posts on the homepage to show a custom thumbnail size (I already added this custom image size to functions.php, name is 'latestpost'), and I do not want any alignment on homepage, what would I need to change in the code you sent?

    March 7, 2016 at 5:45 pm #180849
    ᴅᴀᴠɪᴅ
    Member

    So then it would be

    <?php
    /**
     * This file controls the posts page
     */
    
    //* Remove default featured image from posts page and replace with thumbnail.
    remove_action( 'genesis_entry_content', 'genesis_do_post_image', 8 );
    add_action( 'genesis_entry_content', 'child_theme_add_thumbnail_image', 8 );
    function child_theme_add_thumbnail_image() {
    
    	$image_args = array(
    		'size' => 'latestpost',
    		'attr' => array(
    			'class' => 'alignnone post-image',
    		),
    	);
    
    	genesis_image( $image_args );
    }
    
    genesis(); 

    The class of 'post-image' is also added incase you need to style the image in anyway to align it better or whatever.


    I love helping creative entrepreneurs build epic things with WP & Genesis.

    Follow on Twitter

    March 8, 2016 at 2:00 pm #180933
    senordeer
    Member

    Thank you so much and apologize for delay in response, I really respect the timeliness of yours. So no problem, I created the home.php file, uploaded it to my child theme, I see it now in theme editor so I feel pretty confident I have done all of that correctly, also regenerated thumbnails just in case., but am still not seeing the size of the thumbnail on homepage change. Do I need to call that new php file somewhere else in my child theme?

    I actually moved this site to a new domain, so examples can be found here:
    Content archives in theme settings set to thumbnail, align left. So this works fine on archives pages eg:
    http://metro.littlebluedeerdesign.com/category/destinations/

    But on the homepage (single post, beneath slider):
    http://metro.littlebluedeerdesign.com/

    The same settings (thumbnail size img, left aligned) even though I did add home.php file as so:

    <?php
    /**
     * This file controls the posts page
     */
    
    //* Remove default featured image from posts page and replace with thumbnail.
    remove_action( 'genesis_entry_content', 'genesis_do_post_image', 8 );
    add_action( 'genesis_entry_content', 'child_theme_add_thumbnail_image', 8 );
    function child_theme_add_thumbnail_image() {
    
    	$image_args = array(
    		'size' => 'latestpost',
    		'attr' => array(
    			'class' => 'alignnone post-image',
    		),
    	);
    
    	genesis_image( $image_args );
    }
    
    genesis(); 

    Not a rush just wanted to respond back thanks again for the input much appreciated.

    March 8, 2016 at 4:02 pm #180943
    ᴅᴀᴠɪᴅ
    Member

    Ah I've just noticed you aren't using an html5 child theme. I didn't realise this before. The way I have given you is the 'new' way, but this won't work unless you have added support for html5. I am actually not that familiar with how Genesis worked before html5 support was added.

    I do know that the hook I used 'genesis_entry_content' didn't exist. Instead it was called 'genesis_post_content' so you could try replacing that. Which would look like this;

    <?php
    /**
     * This file controls the posts page
     */
    
    //* Remove default featured image from posts page and replace with thumbnail.
    remove_action( 'genesis_post_content', 'genesis_do_post_image' )
    add_action( 'genesis_post_content', 'child_theme_add_thumbnail_image' );
    function child_theme_add_thumbnail_image() {
    
    	$image_args = array(
    		'size' => 'latestpost',
    		'attr' => array(
    			'class' => 'alignnone post-image',
    		),
    	);
    
    	genesis_image( $image_args );
    }
    
    genesis(); 

    If that doesn't work then I don't know, sorry. you would need to hunt back in google for tutorials on this dating back before mid 2013.


    I love helping creative entrepreneurs build epic things with WP & Genesis.

    Follow on Twitter

    March 8, 2016 at 4:55 pm #180952
    senordeer
    Member

    That worked! Yep, old school here, I should have mentioned that. For some reason the Featured Image also appeared aligned left on the homepage as well as the new larger image, but I just hid that in css:

    .home img.alignleft {
    display: none;
    }

    Bc I am only having one post on the page so won't be using that. Great, your time and effort is much appreciated, marking as resolved. Thanks again.

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