• 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

[Resolved] FEATURED IMAGE

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

Tagged: featured image

  • This topic has 2 replies, 2 voices, and was last updated 5 years, 7 months ago by chasingthedonkeY.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • June 13, 2015 at 11:53 pm #295
    chasingthedonkeY
    Participant

    Heya guys,

    I am wondering if its possible to get the ‘featured image’ added to each blog post. My old theme added it automatically and I re-added the H1 title tags to the blog post. Now as a result I have the title appearing twice. Thanks so much.

    I have a screen shot if you wish. An example is here: http://www.chasingthedonkey.com/what-to-do-on-holidays-in-croatia/

    June 14, 2015 at 1:30 am #297
    Chinmoy Paul
    Moderator

    Add the following code in your functions.php file

    add_action( 'genesis_entry_content', 'genesis_do_post_image_single_post', 8 );
    function genesis_do_post_image_single_post() {
      
      if( ! is_singular('post') )
        return;
    
      $img = genesis_get_image( array(
    			'format'  => 'html',
    			'size'    => 'full',
    			'context' => 'archive',
    			'attr'    => array('class' => 'aligncenter'),
    		) );
    
    	if ( ! empty( $img ) )
    		printf( '<p>%s</p>', $img );
    }

    ====================

    Title:
    Are you adding the title in WP Editor? Do not need to add it there. Title will automatically come on Single details page.

    June 14, 2015 at 11:58 am #298
    chasingthedonkeY
    Participant

    Thanks so much! That worked perfectly! And yes I have been adding, I’ll stop now. Thanks again 😀

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Log In

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