Logo
Services - Code - Javascript
Services - Code - Javascript

sampWPgallery

This Javascript snippet transforms regular WordPress (Guttenberg) gallery into Google style image browser.

Simple installation

CSS

<link rel='stylesheet' href='sampwpgallery.css' type='text/css' />

Javascript

<script type='text/javascript' src='sampwpgallery.js' async='async'></script>
<script>

window.onload = function(evt){
        if(jQuery().sampGallery) {
                if(jQuery('.wp-block-gallery').length > 0){
                    jQuery('.wp-block-gallery').sampGallery();
                }
        }
};
</script>

Admin setup

!Important

Remember to change Gallery settings so that images link to Media File!

READ ALSO

Instagram

HELLO!