Community Forums › Forums › Archived Forums › Design Tips and Tricks › Seperate Picture for Post Thumbnail rather than using image from post – Minimum
- This topic has 6 replies, 3 voices, and was last updated 13 years, 5 months ago by
eluviis.
-
AuthorPosts
-
February 19, 2013 at 2:44 am #21230
rosstcorbett
MemberHi,
For my blog post thumbnail I would like to use a different picture than what is in the blog post.
From what I understand, a thumbnail picture is created by taking the first photo from the Blog post.
How can I use a different photo for the post thumbnail?
Thanks.
Ross
February 19, 2013 at 5:35 am #21257Peter
MemberHi Ross.
Just a quick guess here, but have you tried adding featured images to your posts? I think featured image images take precedence over images in the post content for the thumbnails..
February 19, 2013 at 5:41 am #21258rosstcorbett
MemberHi Peter,
Yes I have tried that but when doing this the featured image then also appears in the blog post.
I have recently swapped over from using Thesis, there was a very simple way of doing it on there and I am sure there must also be a simple way of doing it using Genesis.
Just need to find out how 🙂
February 19, 2013 at 5:59 am #21261Peter
MemberAh.. I just checked.. do you mean the featured image which appears above the post title on single posts?
February 19, 2013 at 6:05 am #21264rosstcorbett
MemberYes, I don't want the Featured image to appear in the blog post, I just want it to appear as the post thumbnail picture.
February 19, 2013 at 6:12 am #21270Peter
MemberOk. In your functions.php file on line 66 there is a function which displays the featured images.. it looks like this;
/** 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>'; } }If you change it to this;
/** 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>'; } */ }the featured images on single pages won't be shown above the title, so you can use them for the thumbnails.
Edit: the forum is mucking about with the ampersands and turning them into #038; - they should be a plain ampersand in your code..
Does that do what you need?
February 25, 2013 at 11:42 pm #22844eluviis
MemberBy the way... This thread my interest you: http://www.studiopress.community/topic/minimum-theme-best-practices-for-featured-images/
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.