Reply To: Center Align Featured Images

Homepage Community Forums Epik Theme Support Center Align Featured Images Reply To: Center Align Featured Images

#4383
Dinesh Sharma
Customer

    @kronos – well I have submitted my request in studiopress community forums also.

    BTW, I have now found a solution by wrapping featured image in a div.
    I had to add DIV in function genesis_do_post_image() { } in post.php as shown below:


    function genesis_do_post_image() {

    if ( ! is_singular() && genesis_get_option( 'content_archive_thumbnail' ) ) {
    $img = genesis_get_image( array( 'format' => 'html', 'size' => genesis_get_option( 'image_size' ), 'attr' => array( 'class' => 'post-image' ) ) );

    if( ! empty( $img ) )
    printf( '<div class="featured-image">%s</div>', get_permalink(), the_title_attribute( 'echo=0' ), $img );
    }
    }

    Following is the CSS:`
    .featured-image {
    text-align: center;
    }

    .featured-image img {
    margin: 0;
    }
    `

    I was able to do it using Genesis Hooks also except I didn’t see post excerpt in first post. So I just added the required code in Genesis itself. But I guess it will get overwritten with Genesis update. Well until then it good for me.

    You can have a look here.
    http://www.dscentral.in/page/2/

    Thanks,

    Dinesh Sharma