Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #9359
    teraviva
    Participant

    hello, I use Ajax to load new posts and in some case with default posts it work, than I click load more and have some more posts. If I try to click on new posts photo they appear in lightbox, but actually there are two lightboxes active in the same time. And if I load more – there are three lightboxes appear on click.

    #9360
    teraviva
    Participant
    This reply has been marked as private.
    #9392
    Bartosz
    Keymaster

    hi @teraviva,

    Looks like a TosRuS bug. Are you using the latest Responsive Lightbox version?

    #9393
    teraviva
    Participant

    Yes, there no update alerts in plugins.
    Actually, I research the problem and have some answers for you.
    This bug appear because in file class-frontend for “rel” used “298 ++ $this->gallery_no”;
    And in case for ajax there are two galleries with identical rel. I propose to use the POST id, maybe with this simple numeration.

    In that case rel will be always unic. I didn`t get how to change this in class-frontend, so I did some hack in functions.php with gallery shortcode and use only ID because I have only one gallery per post:

    $output = str_replace(‘ID.'”‘, $output );
    //THIS WILL WORK. You can check it now.
    But It will give some troubles for more galleries, so I will hope for new updates.

    #9394
    teraviva
    Participant
    $output = str_replace('<a ','<a data-rel="lightbox-gallery-'.$post->ID.'"', $output );
    //THIS WILL WORK

    sory, code was broken

    #9395
    Bartosz
    Keymaster

    Yea, but this is far from ideal. We’ll take a look.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.