Archived topic
Front page changed…
7 replies · Started by Pops on November 16, 2022
Hi,
I hope you can help.
My website has - somehow on its own - changed from a gallery/grid of rows of 4 photos, to a page where the page it just a vertical town of photos one under neath the other. I can’t seem to get it back to how it was.
Can anyone please offer advice.
I am adding site in the ‘sensitive’ information box.
Thank you
Hi there,
Yeah WP 6.1 made changes to how their CSS for galleries is applied, and it seems to break older galleries.
Try this CSS to fix that:
can you try adding this CSS:
body .is-layout-flex {
display: flex;
flex-wrap: wrap;
}
That is so great.
Thank you :)
Very much appreciated as always :)
P
Glad to be of help!
This is concerning, wow. I wanted to test this so updated to 6.1.1 for 1 site and sure enough, the gallery broke. I tried to insert a new gallery and it still breaks. David, do you know if the WP Core team is aware of this and will roll out a fix? Already had to run custom css to fix the Gallery block when using Shortpixel to display webp and avif. Hoping we don't have to run more custom code to use the core Gallery block? Nuts.
Reading in more detail, some users experience the issue when they dequeue WPs global styles.
remove_action( 'wp_enqueue_scripts', 'wp_enqueue_global_styles' );
Which it seems that some optimizing plugins do disable - see Franks reply regarding autoptimize here:
https://core.trac.wordpress.org/timeline?from=2022-11-10T06%3A04%3A22Z&precision=second
You can keep track of the issue here:
CoreTrac:
https://core.trac.wordpress.org/ticket/56970
Gutenberg GitHub:
https://github.com/WordPress/gutenberg/issues/45713
Thanks for sharing David! Crazy how gallery and query loop broke after 6.1. As support has offered a solution with custom css, we can only hope there is a hard fix to follow. I see Frank's response, can't believe 3rd party providers have to provide a fix for core, ouch right!
Thanks again!
Are you using Autoptimize ?