typical code of wordpress gallery is


(see below)
how to convert it into other simple code with custom classes (via functions.php)

 <div class="mini-gallery-wrapper">
                            <a data-lightbox="image-1" href="img/sample1.jpg" data-title="Przykład" class="mini-gallery-item">
                                <img src="img/sample1small.jpg" alt="">
                            </a>
                            <a data-lightbox="image-2" href="img/sample2.jpg" data-title="Przykład" class="mini-gallery-item">
                                <img src="img/sample2small.jpg" alt="">
                            </a>
                        </div>

— ORGINAL CODE OF WORDPRESS BELOW —

<div id="gallery-2" class="gallery galleryid-16 gallery-columns-5 gallery-size-thumbnail"><dl class="gallery-item">
            <dt class="gallery-icon landscape">
                <a href="link1.jpg" data-slb-active="1" data-slb-asset="1903913040" data-slb-internal="0" data-slb-group="16_auto_1"><img width="150" height="150" src="name1.jpg" class="attachment-thumbnail size-thumbnail" alt=""></a>
            </dt></dl><dl class="gallery-item">
            <dt class="gallery-icon landscape">
                <a href="link2.jpg" data-slb-active="1" data-slb-asset="72767957" data-slb-internal="0" data-slb-group="16_auto_1"><img width="150" height="150" src="name2.jpg" class="attachment-thumbnail size-thumbnail" alt=""></a>
            </dt></dl 

            <br style="clear: both">
        </div>

Read more here: custom wordpress gallery via functions.php


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: