• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Appfinite

Appfinite

Premium WordPress Themes for The Genesis Framework

  • Themes
  • Blog
  • Tutorials and Resources
  • Forums
  • Contact Us

Reply To: Feature Image on Posts

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

February 2, 2014 at 1:59 am #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

Primary Sidebar

Search Forums

Affiliate Program

Looking to earn some money? Join our Affiliate program and earn 35% of every sale you refer. Top referrers earn 40-50%.

Join Now →

The Genesis Framework

All of our themes are designed for the Genesis Framework. You will need to purchase Genesis in order to use any of our themes.

Purchase Genesis

Hire a Web Developer

Need help setting up or customizing your website?

Contact Us →

Search Full Site

  • Buy Genesis!
  • Shopping Cart
  • Themes
  • My Account
  • Support Forums
  • Tutorials and Resources
  • Privacy Policy
  • Contact Us
  • Follow Us on Twitter

Copyright © 2023 · Appfinite · Built With The Genesis Framework