Masonry style WordPress Gallery without using plugin

Nowadays Masonry styled Gallery layouts are very common for websites. There are many third party WordPress plugins for Galleries that either provide their own Gallery or provide styling skins for the default WordPress Gallery.

For the sake of this post we will learn how to apply Masonry Layout to default WordPress Gallery. Below is the code.

CSS

JQuery

PHP

Note that masonry.pkgd.min.js and imagesloaded.pkgd.min.js should be present in js folder of your active theme.

Join the discussion

  1. Konstantin says:

    JQuery code Where to insert?

Leave a Reply

Your email address will not be published. Required fields are marked *