- This topic has 5 replies, 2 voices, and was last updated 4 years, 9 months ago by
David.
-
AuthorPosts
-
September 2, 2021 at 1:57 am #1916262
dmendana
Hi! I’m experimenting with the new Query block in WP 5.8 and the main problem I’m finding is the lack of options to choose a size and aspect ratio for the post thumbnail. The block is using the full size image for the thumbnails, so all thumbnails are wildly different and a grid is impossible.
According to what I’ve read, in this early stage of the Query block we are stuck with the theme’s thumbnail size.
Is there any option in Generatepress that would change the featured image size in a Query block? I’ve changed the option in Customizer > Layout > Blog > Featured Images > Media Attachment Size, but it didn’t change anything in the Query block. I’ve also looked at Settings > Media, but there’s nothing useful there.
Thanks!
September 2, 2021 at 7:30 am #1916545David
StaffCustomer SupportHi there,
to be honest, i played with the Query Loop block and the other template blocks, and well, it wasn’t long before i dropped the idea of using them anywhere lol – they’re a great idea but very half baked at this time.
Was there a particular post you could link me to that references the ‘themes thumbnail size’ ? Might give me some pointers.
September 2, 2021 at 7:53 am #1916743dmendana
Hi! I read it here, it’s not a technical article.
However, the Post Featured Image block does not currently have sizing controls, so you are stuck with your theme’s default post-thumbnail size — assuming it is actually registered.
I have managed to change the visible size of the image with CSS, but not the image file being used, still the original. If there’s no way to change that, I’ll probably search for a plugin to embed a post grid block.
Thanks!
September 2, 2021 at 8:16 am #1916766David
StaffCustomer SupportAh ok … so the Theme doesn’t set on, so you should be able to use a PHP Snippet like so:
function wpdocs_setup_theme() { set_post_thumbnail_size( 150, 150 ); } add_action( 'after_setup_theme', 'wpdocs_setup_theme' );Reference: https://developer.wordpress.org/reference/functions/set_post_thumbnail_size/
I would test it on a dev site, as i am not sure if that will interfere with any other functions.
September 2, 2021 at 9:33 am #1916838dmendana
That worked!
Thank you very much.
September 2, 2021 at 9:37 am #1916841David
StaffCustomer SupportAwesome – glad to hear that!
-
AuthorPosts
- You must be logged in to reply to this topic.