Есть галерея на сайте Вордпресс, выполненная при помощи Magnificent Popup Gallery
Код вызова гплереи
// Modal popup$(function () {
jQuery(document).ready(function($){
$('.portfolio-item').magnificPopup({
type: 'image',
closeOnContentClick: true,
image: {
verticalFit: false
}
});
/* });
jQuery(document).ready(function($){*/
$('.sotrudnik-wrap').magnificPopup({
delegate: 'a', // the selector for gallery item
type: 'image',
closeOnContentClick: true,
gallery: {
enabled:true
}
});
});
ставится на
<div class="sotrudnik-wrap row">
<?php if ( $sertifikat->have_posts() ) : while ( $sertifikat->have_posts() ) : $sertifikat->the_post(); ?>
<?php if ( has_post_thumbnail()) { ?>
<a href="<?php if (function_exists('wp_get_attachment_url')) {echo wp_get_attachment_url(get_post_thumbnail_id($post->ID), 'full'); }?>" title="<?php the_title(); ?>" class="col-xs-12 col-sm-6 col-md-3">
<?php the_post_thumbnail('sotrudniki-thumb', ['class' => 'img-responsive']); ?></a>
<?php } ?>
<?php endwhile; ?>
<?php endif; ?>
</div>
Но не отрабатывает переключение между изображениями