Questions tagged [masonry]
Masonry is a JavaScript grid layout library. It works by placing elements in optimal position based on available vertical space, sort of like a mason fitting stones in a wall.
31 questions
1 vote
2 answers
390 views
How to re-render Gutenberg component when object instance is available
I'm working on a Gutenberg component that displays a grid of images using the core Masonry library (some code omitted for brevity): const containerMasonryRef = useRefEffect((element) => { var ...
0 votes
1 answer
494 views
Masonry gallery block is working in the block editor but not the template editor
I'm building a custom Masonry (non-jQuery version) gallery block and I managed to make it work in the block editor. I'm using WP 6.3. This is roughly the code: JS: const containerRef = useRef(null); ...
0 votes
1 answer
341 views
How to import the imagesLoaded and Masonry libs that come with WP in a Gutenberg block?
I'm trying to develop a Gutenberg block that needs the Masonry lib to work: const containerRef = useRef(null); const { attributes: { images, column_width, gap }, setAttributes, } = props; ...
0 votes
1 answer
145 views
Change normal grids to masonry grids
I'm currently creating a wordpress theme and so far all my code is working fine (my theme is based on the isotope js gallery), but I would like to transform my normal grids into masonry grids, could ...
2 votes
1 answer
27k views
Script doesn't load because of a javascript MIME type error
I'm trying to get the jQuery Masonry plugin to work on a site. I've updated my template files to get the proper classes where the plugin needs them. Then I enqueued my scripts like this: function ...
0 votes
1 answer
639 views
Masonry grid with bootstrap 4
I have the following code that is supposed to display a masonry grid using bootstrap 4. I've tested the code but the grid will not be displayed correctly on desktop and tablets. On mobile instead ...
0 votes
0 answers
35 views
Help finding a plugin - masonry type post grid
I would like to know if there exists a similar plugin to how this page lists its' products below the main banner: https://www.ycmcnc.com/en Talking about this module: https://i.sstatic.net/1HFlS.jpg ...
1 vote
0 answers
113 views
Masonry, WP_Query & paged - first page repeating, second page not loading
I'm tearing my hair out over this. I've been tasked with some legacy work on a quite an old site. They have a template for a custom post type called resources. This template has search/filtering ...
1 vote
0 answers
152 views
Masonry images not working
Until yesterday, all 10 tiles were showing on the main page on this website. After updating 3-4 pages and adding a "blog" function to them (separated by category), only 3-6 tiles will show at any ...
0 votes
2 answers
723 views
Add wp posts to cutom masonry grid
I need to create masonry grid containing the latest posts. I created a grid based on https://masonry.desandro.com/ - the grid displays correctly. I am asking for help in creating a wp loop that will ...
0 votes
1 answer
754 views
masonry only works if jquery is called twice
So I noticed that I'm loading jQuery twice in my WordPress install and when I removed the CDN I added in my footer and just use the jQuery WordPress comes with my masonry stopped working and gave the ...
1 vote
0 answers
2k views
"Bad element for masonry: undefined" why this error us occuring? [closed]
I am developing a WordPress Theme using masonry. but it generates following error on index page "Bad element for masonry: undefined" and these two errors on single.php "Bad element for masonry: ...
-1 votes
1 answer
1k views
Jetpack Infinite Scroll, Isotope and ImagesLoaded
I'm trying to build grid with Infinite scroll and Isotope. I'm using also ImagesLoaded plugin for images which overlaps each other. The problem is I still get images overlap even that I triggered ...
0 votes
1 answer
115 views
Javascipt issue on custom theme
First off I always seem to have trouble getting my JS to work with WP. Currently I need some help figuring out what is going wrong with my javascript and ultimately what I am doing wrong. I have this ...
0 votes
1 answer
671 views
Wordpress keeps showing mobile version on Internet Explorer
I have wordpress 4.3.1 installed on the intranet with a standard theme TwentyFourteen. When I use Firefox and Chrome to view the website, everything works exactly like it should. However, on IE9 and ...