• Resolved infohowdy

    (@infohowdy)


    Hello, this is a stupid question… I can use two links for same gallery without duplicates pics ?
    My structure is like this

    <ul>
    
      <li><a href="image1.jpg"><img src="image1.jpg" /></a><span>sometext</span><a href="image1.jpg">View this pic</a></li>
    
      <li><a href="image2.jpg"><img src="image2.jpg" /></a><span>sometext</span><a href="image2.jpg">View this pic</a></li>
    
    </ul>

    https://wordpress.org/plugins/easy-fancybox/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi infohowdy, yes that is possible but you need to do some extra work.

    1. Disable the auto-gallery option in the Images section on Settings > Media. Or set it to WordPress Galleries only…
    2. Append two different “rel” attributes to the the source code so that each time only two image links match. For example:

    <ul>
      <li><a href="image1.jpg" rel="mygallery-1"><img src="image1.jpg" /></a><span>sometext</span><a href="image1.jpg" rel="mygallery-2">View this pic</a></li>
      <li><a href="image2.jpg" rel="mygallery-1"><img src="image2.jpg" /></a><span>sometext</span><a href="image2.jpg" rel="mygallery-2">View this pic</a></li>
    </ul>

    This causes FancyBox to create two seperate galleries (each with the same two images so visitors will not notice the difference) instead one gallery with double images.

    Thread Starter infohowdy

    (@infohowdy)

    Thankyou !

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘two links for same gallery, no duplicates’ is closed to new replies.