• Resolved wibergsweb

    (@wibergsweb)


    Hi

    I think ur plugin is great. I wonder if there are any options to remove duplicates from a gallery.

    My issue is this. I have “sections” of images that are generated from ACF-repeater field.

    eg.

    <div class="image-normal"><a href="fullsize-image">Image</a></div>
    <div class="image-minor"><a href="fullsize-image">Image</a></div>

    The reason why I have that is that I need to scale them differently depending on the resolution that the user uses (and their “standing” and “laying” images so I show some at some point and hide some of the images at another point.

    When the lightbox gallery is generated there are two of each image (of course).

    So my question is: Are there any way of removing duplicates from the automatically generated gallery from an acf-field?

    • This topic was modified 9 years, 4 months ago by wibergsweb.
Viewing 1 replies (of 1 total)
  • Plugin Author Archetyped

    (@archetyped)

    Hi, you could use the [slb_group] shortcode to group the differently sized links into separate groups (e.g. image-normal, image-minor, etc.). When a link is clicked it will only display other links in the same group (e.g. the other images displayed for the user’s current resolution). See SLB’s documentation for more details on using [slb_group].

    Another option is to use responsive image attributes to define different files to display for an image element in different situations (resolution, orientation, etc.). This avoids any duplicate links because all variations of an image are contained in a single image element.

    • This reply was modified 9 years, 4 months ago by Archetyped.
Viewing 1 replies (of 1 total)

The topic ‘Remove duplicates in automatically generated gallery?’ is closed to new replies.