• Resolved andreasTypo

    (@andreastypo)


    Hi,

    On my wordpress site I have a gallery page, on this url https://typograficsonline.be/pjb/galerij/

    When clicking an item I get a lightbox showing the image. However, I’d like to be able to click through to the next post (in this lightbox).

    Anyone have a clue on how to let it work this way? I got the theme from templatemonster, but they want me to pay extra for this option. I would think it was logical that a gallery, works as a gallery.

    I’m not that good in coding, so hoping anyone can help me in the right direction…

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter andreasTypo

    (@andreastypo)

    I found some further info about it, https://dimsemenov.com/plugins/magnific-popup/

    This is the plugin installed. On my theme it’s the single image lightbox, and I would like the lightbox gallery on the right side. Though I’m not sure on how to add the next and prev button or how to edit these files. Anyone with experience with this, any help is appreciated.

    I’m thinking it has something to do with this code:

    $('.gallery-item').magnificPopup({
    	  type: 'image',
    	  gallery: {
    		  enabled: true, // set to true to enable gallery
    
    		  preload: [0,2], // read about this option in next Lazy-loading section
    
    		  navigateByImgClick: true,
    
    		  arrowMarkup: '<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>', // markup of an arrow button
    
    		  tPrev: 'Previous (Left arrow key)', // title for left button
    		  tNext: 'Next (Right arrow key)', // title for right button
    		  tCounter: '<span class="mfp-counter">%curr% of %total%</span>' // markup of counter
    }
    	});

    Thanks in advance

    Thread Starter andreasTypo

    (@andreastypo)

    I thought that adding that code would automatically add this code:

    <button title="Previous (Left arrow key)" type="button" class="mfp-arrow mfp-arrow-left mfp-prevent-close"></button>
    <button title="Next (Right arrow key)" type="button" class="mfp-arrow mfp-arrow-right mfp-prevent-close"></button>

    but nothing happens. Feel like I’m close but no result yet

    UPDATE

    I’m getting the arrows now, but clicking them doesn’t initiate going to next item…

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Add gallery feature to custom post type’ is closed to new replies.