Tagged: featured image
-
AuthorPosts
-
March 11, 2015 at 6:22 pm #410017
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?March 12, 2015 at 5:04 pm #410583Hey 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-
This reply was modified 10 years, 7 months ago by
Elliott.
March 12, 2015 at 5:33 pm #410598I 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?
March 12, 2015 at 7:14 pm #410664Nevermind. 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;
}March 13, 2015 at 6:43 pm #411202Hey!
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 -
This reply was modified 10 years, 7 months ago by
-
AuthorPosts
- You must be logged in to reply to this topic.
