Community Forums › Forums › Design Tips and Tricks › Minimum Featured Image Help
Tagged: featured image, grid loop, mimimum home, minimum
This topic contains 2 replies, has 2 voices, and was last updated by amandac 5 months, 2 weeks ago.
-
AuthorPosts
-
December 27, 2012 at 9:35 am #7676
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,
AmandaDecember 31, 2012 at 9:56 am #8596You 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);
Jennifer “Hermione” Baumann | Recommended StudioPress Developer
Dream Whisper Designs | Themessence | @dreamwhisper | If I’ve helped, like me on FacebookDecember 31, 2012 at 7:50 pm #8658Thank you so so much! It all worked perfectly. Thank you for being so clear in your directions. I really appreciate it.
Amanda
-
AuthorPosts
The topic ‘Minimum Featured Image Help’ is closed to new replies.