Tagged: featured image
How would I go about changing the format of my single post so that the Featured Image appears below the content?
Also, what is the recommended size and/or aspect ratio to have the Featured Image thumbnail stretch across the entire post?
Hey rchadek!
If you need the ability to post a landscape or portrait feature image then what you can do is add this to the text editor of your post.
<style type = "text/css">.big-preview { display: none !important; }</style>
And then use our avia image shortcode to display your image in the content in any size that you need. An image size of around 845 x 321 should fill up the area if your using a sidebar.
Cheers!
Elliott
I think that should work – BUT – the people who will be posting aren’t very technically savvy so making them post a piece of code in every post isn’t realistic. Is there a way to apply a filter in functions.php that will automatically prevent the featured image (.big-preview) from displaying in the post by default?
Nevermind. I think I got it to work with the filter below. Does this look like the best way to do this?
add_filter( ‘the_content’, ‘featured_image_before_content’ );
function featured_image_before_content( $content ) {
if ( is_singular(‘post’) && has_post_thumbnail()) {
$html = ‘<style type = “text/css”>.big-preview { display: none !important; }</style>’;
$content = $html . $content;
}
return $content;
}
Hey!
Sorry, this would have worked also if you just want to add it to your custom CSS.
.single .big-preview { display: none !important; }
Regards,
Elliott