- This topic has 25 replies, 7 voices, and was last updated 5 years, 7 months ago by
Leo.
-
AuthorPosts
-
October 19, 2016 at 10:32 am #237013
Tom
Lead DeveloperLead DeveloperHi there,
I’m not too sure what you mean – do you have any examples?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentOctober 20, 2016 at 12:54 am #237207Israel
I’m in the request for the custom-size image single-post
October 20, 2016 at 9:04 am #237365Tom
Lead DeveloperLead DeveloperThis post should help then: https://generatepress.com/forums/topic/featured-image-default-size-on-single-post/#post-233803
If you don’t use one of the WP generated sizes (full, medium, thumb), you can create your own:
add_action('after_setup_theme', 'tu_add_image_sizes'); function tu_add_image_sizes() { add_image_size( 'custom-image-size1', 300, 9999 ); //300 pixels wide (and unlimited height) add_image_size( 'custom-image-size2', 220, 180, true ); //(cropped) }
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentDecember 22, 2016 at 7:08 am #257049Karl
I would also like this feature! π
Right now I have my front page showing latest posts, 2 columns and full width on first post.
With the blog plugin i have a specified width and height on post image and it looks very nice.
But I want the single post featured image to be the same size as the latest post on the front page. This will enhance the feeling of consistency across the website. If that makes sense π
December 22, 2016 at 10:56 am #257109Tom
Lead DeveloperLead DeveloperThanks, Karl!
My “road-block” was that if you set a width and height in the Customizer for single featured images, then the page header options would conflict.
I suppose I could write a conditional that uses the Customizer option as long as the resize options in the page header meta box aren’t set.
Will look into getting this added π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentDecember 23, 2016 at 2:39 am #257283Karl
Cool!
For now I just upload images with exact dimentions.
Thanks
December 23, 2016 at 10:29 am #257393Tom
Lead DeveloperLead DeveloperNo problem π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentJune 23, 2017 at 8:52 am #337996Benjamin
Adding my voice to this as a request! I’ve successfuly changed the dimensions of the image on an archive page, or blog homepage to a uniform 700×300, but would like that to be true on the inside single post as well! Thanks!
June 23, 2017 at 9:12 am #338004Leo
StaffCustomer SupportLike to set a dimension for featured image in single posts?
If so you can try some CSS for now:
.page-header-image-single { max-width: 700px; }
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/June 23, 2017 at 10:11 am #338028Benjamin
Hi Leo! Thanks for that. I’m looking for a precise 700×300 dimension. It works like a charm on the frontpage and archive page etc) as seen here: https://scienceblog.com/
My goal is to learn how to implement that uniformly on all single posts as well.
June 23, 2017 at 11:10 am #338046Leo
StaffCustomer SupportThat case I would recommend cropping the picture to the exact dimension instead of using CSS.
You can try this CSS but you wouldn’t be able to control the ratio or where the image is cropped. Same reason why we usually only specify the width and let the height be scaled automatically.
.page-header-image-single { width: 700px; height: 300px; }
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/ -
AuthorPosts
- You must be logged in to reply to this topic.