Seperate Picture for Post Thumbnail rather than using image from post – Minimum

Community Forums Forums Design Tips and Tricks Seperate Picture for Post Thumbnail rather than using image from post – Minimum

This topic is: not resolved

This topic contains 6 replies, has 3 voices, and was last updated by  eluviis 1 year, 4 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #21230

    rosstcorbett
    Participant
    Post count: 14

    Hi,

    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

    WW2 Discovery

    #21257

    Peter
    Participant
    Post count: 76

    Hi 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..


    Website: petercoughlin.com
    Twitter: petercoughlin

    #21258

    rosstcorbett
    Participant
    Post count: 14

    Hi 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 :)

     

    #21261

    Peter
    Participant
    Post count: 76

    Ah.. I just checked.. do you mean the featured image which appears above the post title on single posts?


    Website: petercoughlin.com
    Twitter: petercoughlin

    #21264

    rosstcorbett
    Participant
    Post count: 14

    Yes, I don’t want the Featured image to appear in the blog post, I just want it to appear as the post thumbnail picture.

    #21270

    Peter
    Participant
    Post count: 76

    Ok. In your functions.php file on line 66 there is a function which displays the featured images.. it looks like this;

    [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>’;
    }
    }[/php]

    If you change it to this;

    [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>’;
    }
    */
    }[/php]

    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?


    Website: petercoughlin.com
    Twitter: petercoughlin

    #22844

    eluviis
    Participant
    Post count: 115

    By the way… This thread my interest you: http://www.studiopress.com/forums/topic/minimum-theme-best-practices-for-featured-images/

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

You must be logged in to reply to this topic.