Tagged: Galleries
- AuthorPosts
- June 2, 2021 at 1:44 pm #38744Emmett FisherGuest
Hello! I am having the exact same issue as this person on both of my pages using your galleries.
Any help would be greatly appreciated, thank you!
June 2, 2021 at 3:34 pm #38775Jesse OwensKeymasterHi Emmett-
Thanks for reaching out, and thanks for using the BoldGrid Post and Page Builder for WordPress.
As was mentioned in the thread you linked, the Gallery plugin has a limitation about detecting the screen size when the images are “above the fold” of the website- that is to say, visible without scrolling down.
The easiest way to fix this is to add some content to “push” your gallery down, however there is a “hack” you can use to work around the limitation.
To use the “hack,” navigate to Customize > Advanced > Custom JS & CSS and paste this JavaScript snippet into your Custom Theme JS:
jQuery(document).ready(function() { setTimeout(() => { window.dispatchEvent(new Event('resize')); }, 1); });
Be sure to delete the
//
characters that are automatically added to the first line when you first paste it in.Basically, what this does is wait 1 millisecond after the screen is “loaded,” and triggers the resize event to fool the gallery into thinking it has been resized.
- AuthorPosts
- The topic ‘Masonry Gallery Only Looks Proper When Resizing The Window Slightly’ is closed to new replies.