• Resolved david78987

    (@david78987)


    Hello, thank you for a great plugin!

    I have several galleries on one page, and would like to allow for clicking through all of them with the next-arrow in the lightbox. I found your previous solution here:

    https://wordpress.org/support/topic/link-multiple-galleries-2/

    I tried adding your code to row 14 in the plugin but can not get it to work on my site. Do you have any idea what I could be doing wrong?

    Thank you,
    David

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Johannes Kinast

    (@goaroundagain)

    Hi @david78987,

    I think you need a different CSS selector. The right one for your theme should be .entry-content

    I would suggest using the baguettebox_selector now. Add the following code to your functions.php:

    add_filter( 'baguettebox_selector', function() { return '.entry-content'; } )

    More here: https://wordpress.org/plugins/gallery-block-lightbox/#how%20can%20i%20add%20my%20own%20block%3F%20%2F%20can%20i%20change%20the%20css%20selector%3F

    If you edit the plugin files, the next plugin update will override any change.

    Thread Starter david78987

    (@david78987)

    Hello Johannes,

    Strange, I added the following code using the code snippets plugin:

    add_filter( 'baguettebox_selector', function() { return '.entry-content'; } )

    But I get a site error:

    Parse error: syntax error, unexpected end of file in /data/0/6/06b2e51d-1ad5-4159-aca9-71fcbb2f11c7/stigmorin.se/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(504) : eval()’d code on line 2

    Plugin Author Johannes Kinast

    (@goaroundagain)

    Add a ; at the end.

    Thread Starter david78987

    (@david78987)

    I added

    add_filter( ‘baguettebox_selector’, function() { return ‘.entry-content’; } );

    It killed the site when I ran it “everywhere” in code snippets, however, when I set code snippet to only run it in the front end, it works! So I’d say it’s a win.

    Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Allow lightbox to click through several galleries’ is closed to new replies.