• Home
  • Blog
  • Showcase
  • Setup Docs
    • Sunshine Help
    • Flex Help
  • Support
    • Support Area
    • Contact us
    • Feedback
  • Connect
    • Newsletter
    • Twitter
    • Facebook
  • My Account
  • Flex
  • Sunshine
Support : Simple Pro Themes

Support : Simple Pro Themes

Reply To: Featured image isn’t showing on individual blog posts

If you have purchased a product, please enter the email address that you used to register at time of purchase.
Log In
Lost Password

Create an Account
  • Your username must be unique, and cannot be changed later.
  • We use your email address to email you a secure password and verify your account.

Support › Forums › Flex Theme › Featured image isn’t showing on individual blog posts › Reply To: Featured image isn’t showing on individual blog posts

August 3, 2016 at 6:32 am #1153
Chinmoy Paul
Moderator

Extremely Sorry! Above code is wrong. Here is the correct one:

add_action('genesis_entry_header', 'flex_single_post_image', 4 );
function flex_single_post_image() {
  if( ! is_singular( 'post' ) )
    return;
  
  $img = genesis_get_image( array(
    'format'  => 'html',
    'size'    => 'large',
    'context' => 'archive',
    'attr'    => genesis_parse_attr( 'entry-image', array ( 'alt' => get_the_title() ) ),
  ) );
  
  if ( ! empty( $img ) ) {

    echo $img;
  
  }
}
  • This reply was modified 6 years ago by Chinmoy Paul.

Copyright © 2022 · Simple PRO Themes for Genesis Framework · About · FAQs · Contact · Affiliates