Boilerplate for WordPress Gallery CPT

Libraries used

  • lazysizes: ^4.0.0-rc3
  • lightgallery.js: ^1.0.1
  • masonry-layout: ^4.2.0
  • imagesloaded: ^4.1.3

Usage

  1. Copy the folder mu-plugins into /wp-content/.
  2. Use the styles/gallery.scss to create the design - tweaks needed! 
  3. Use js/gallery.js to initialize lightGallery.js, masonry-layout, imagesLoaded and lazysizes.