• 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

Minimum Featured Image Help

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 › Minimum Featured Image Help

This topic is: resolved

Tagged: featured image, grid loop, mimimum home, minimum

  • This topic has 2 replies, 2 voices, and was last updated 10 years, 2 months ago by amandac.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • December 27, 2012 at 9:35 am #7676
    amandac
    Member

    Hi everyone,
    I am using the minimum theme and I love it, however, I was wondering if you could help me make a few changes.
    I would love the blog posts on the homepage to show the featured image. Is this possible to do easily?
    Secondly, when you click on the post it shows the featured image largely at the top of the page. Is there away to have it NOT do this.

    http://www.amandachristian.com

    Thank you,
    Amanda

    December 31, 2012 at 9:56 am #8596
    Jen Baumann
    Participant

    You can remove the featured images on the inner pages by altering this function in functions.php:

    /** Add the featured image section */
    add_action( 'genesis_after_header', 'minimum_featured_image' );
    function minimum_featured_image() {
    	if ( is_home() ) {
    		echo '<div id="featured-image"><img src="'. get_stylesheet_directory_uri() . '/images/sample.jpg" /></div>';
    	}
    	elseif ( is_singular( array( 'post', 'page' ) ) && has_post_thumbnail() ){
    		echo '<div id="featured-image">';
    		echo get_the_post_thumbnail($thumbnail->ID, 'header');
    		echo '</div>';
    	}
    }

    to

    /** Add the featured image section */
    add_action( 'genesis_after_header', 'minimum_featured_image' );
    function minimum_featured_image() {
    	if ( is_home() ) {
    		echo '<div id="featured-image"><img src="'. get_stylesheet_directory_uri() . '/images/sample.jpg" /></div>';
    	}
    }

    In home.php, you can alter the grid loop to include featured images, by changing the grid_image_size.

    add_action( 'genesis_loop', 'minimum_grid_loop_helper' );
    function minimum_grid_loop_helper() {
    
    	if ( function_exists( 'genesis_grid_loop' ) ) {
    		genesis_grid_loop( array(
    			'features' 				=> 0,
    			'feature_image_size' 	=> 'featured',
    			'feature_image_class' 	=> 'post-image',
    			'feature_content_limit' => 0,
    			'grid_image_size'		=> 0,
    			'grid_image_class'		=> 'alignnone',
    			'grid_content_limit' 	=> 250,
    			'more'					=> __( '[Read more]', 'minimum' ),
    		) );
    	} else {
    		genesis_standard_loop();
    	}
    
    }

    Like

    'grid_image_size'			=> 'grid-thumbnail',

    You'll also need to register an image size (or use one already registered in functions.php) and maybe even add a bit of css.

    add_image_size('grid-thumbnail', 100, 100, TRUE);
    December 31, 2012 at 7:50 pm #8658
    amandac
    Member

    Thank you so so much! It all worked perfectly. Thank you for being so clear in your directions. I really appreciate it.

    Amanda

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Minimum Featured Image Help’ is closed to new 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