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 1 year, 8 months ago.

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

    amandac
    Participant
    Post count: 4

    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
    Post count: 325

    You can remove the featured images on the inner pages by altering this function in functions.php:
    [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]

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

    In home.php, you can alter the grid loop to include featured images, by changing the grid_image_size.
    [php]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();
    }

    }[/php]

    Like
    [php]‘grid_image_size’ => ‘grid-thumbnail’,[/php]

    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.
    [php]add_image_size(‘grid-thumbnail’, 100, 100, TRUE);[/php]


    If you need technical support for your theme please file a ticket.

    The forums are community based. Staff only monitors the forum for issues relating to the forum itself and to redirect users to where they need to go.

    #8658

    amandac
    Participant
    Post count: 4

    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.