Reply To: Feature Image on Posts

Homepage Community Forums Epik Theme Support Feature Image on Posts Reply To: Feature Image on Posts

#10354
Michael
Customer

    Thanks Wes.

    What about this block of code?

    add_action( ‘genesis_entry_header’, ‘genesis_do_single_post_image’ ); // this is for HTML5 hook
    add_action( ‘genesis_before_post_title’, ‘genesis_do_single_post_image’ ); // This is for Pre-HTML5 hook
    function genesis_do_single_post_image() {

    if ( is_single() ) {
    $img = genesis_get_image( array(
    ‘format’ => ‘html’,
    ‘size’ => genesis_get_option( ‘image_size’ ),
    ‘context’ => ‘archive’,
    ‘attr’ => genesis_parse_attr( ‘entry-image’ ),
    ) );

    if ( ! empty( $img ) )
    printf( ‘%s‘, get_permalink(), the_title_attribute( ‘echo=0’ ), $img );
    }

    }

    I would still need to call the function in the correct template. Can you direct me there?

    Thanks again