- This topic has 2 replies, 2 voices, and was last updated 5 years, 7 months ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
Support › Forums › Flex Theme › FEATURED IMAGE
Tagged: featured image
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/
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.
Thanks so much! That worked perfectly! And yes I have been adding, I’ll stop now. Thanks again 😀