Support » Plugin: Responsive Lightbox » rel=“lightbox[gallery-0] doesn’t work

  • Hi,

    on my site the rel doesn’t work, til now I used a prettyPhoto with this code:

    <a class="zoom" title="<?php the_title(); ?>" data-gal="prettyPhoto[gallery]" href="<?php echo esc_url($currenturl); ?>"><span class="fa <?php echo esc_attr($currenticon); ?>"> </span></a>

    Unfortunately prettyPhoto doesnt work well on mobile device, so I found your plugin and replaced the code:

    <a class="zoom" title="<?php the_title(); ?>" rel=“lightbox[gallery-0]“ href="<?php echo esc_url($currenturl); ?>"><span class="fa <?php echo esc_attr($currenticon); ?>"> </span></a>

    The problem is, that clicking on the image, it doesn’t show the associated gallery, but only the single images of the page, how you can see on the pagelink.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author subhansanjaya

    (@subhansanjaya)

    @agramonis Right code should be as follows with the quotation marks:

    <a class="zoom" title="<?php the_title(); ?>" rel="lightbox[gallery-0]" href="<?php echo esc_url($currenturl); ?>"><span class="fa <?php echo esc_attr($currenticon); ?>"> </span></a>

    Please make sure you have the plugin installed and activated.

    Thread Starter Agramonis

    (@agramonis)

    Hi, the code you provided is exact the same I used, but it shows only each single image of the page http://bodyfit-beta.webillusions.info/galerie/, thats wrong.

    I have many galeries, and by clicking the first picture, it should open the gallery associated with this pic and so on. Like I said, with prettyPhoto it worked fine.

    Plugin Author subhansanjaya

    (@subhansanjaya)

    @agramonis Hi, rel attribute of the code need to be changed for the each gallery. Please also make sure to add the code to the gallery associated pictures. For instance gallery 1: rel=”lightbox[gallery-1]”
    gallery 2: rel=”lightbox[gallery-2]”

    I have corrected the quotation marks of this on your code: rel=“lightbox[gallery-0]“ to this rel="lightbox[gallery-0]" 🙂

    Thread Starter Agramonis

    (@agramonis)

    Hi, you are absolutely right, I now recognized, that it even doesn’t work with prettyPhoto, like I want. I am pretty sure it is impossible to do, because I have a cpt with single posts, each post has a thumbnail and images attached. So, the goal is to show on the gallery page I linked the single thumbnails of each post and clicking on it, show the attached images in a lightshow inserted in the post.

    Plugin Author subhansanjaya

    (@subhansanjaya)

    @agramonis If you can display all the images of your post on your gallery page and then you can hide associated images using css except the main image or the image you already displaying. You can use a class for the associated images and hide them using css. ex: visibility: hidden;

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘rel=“lightbox[gallery-0] doesn’t work’ is closed to new replies.