Masonry grid with bootstrap 4

You are blending the Bootstrap framework and the Masonry.js library, but asking for help troubleshooting the resulting CSS on WordPress StackExchange. You’ll have better luck on Stack Overflow 🙂 This isn’t really a WordPress question. I will say I do notice something odd about your code which is that whatever you’re trying to do with … Read more

Add wp posts to cutom masonry grid

Instead of $count == 1 you should use ($count % 12) == 0, 1, and so on till 11. This gives back the remaining of the division. So if $count is 6 you would get 6, but if $count was 16 it would give back 4.

Change normal grids to masonry grids

This is not really a WordPress issue, you will have to play around with the CSS to get the layout you desire, if you take a look at isotope.js library you will see that hey have documentation on how to display Masonry grid https://isotope.metafizzy.co/layout-modes/masonry.html , and if that doesn’t fit your needs you can learn … Read more