Minimum Featured Image Help

Community Forums Forums Design Tips and Tricks Minimum Featured Image Help

This topic is: resolved

This topic contains 2 replies, has 2 voices, and was last updated by  amandac 2 years, 8 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #7676

    amandac
    Participant

    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

    #8596

    Jen Baumann
    Keymaster

    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);
    #8658

    amandac
    Participant

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

    Amanda

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

The topic ‘Minimum Featured Image Help’ is closed to new replies.