I
I
irnikolaevna2018-06-13 21:46:31
Gallery
irnikolaevna, 2018-06-13 21:46:31

Magnificent Popup Gallery images not switching?


There is a gallery on the WordPress site, made with the help of 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
    }
  });
});

put on
<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>

But it doesn't work switching between images

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question