WordPress.org

Support

Support » Plugins and Hacks » How to add lightbox attribute to gallery shortcode?

How to add lightbox attribute to gallery shortcode?

  • Am I doing this wrong?

    Fresh WP version 3.5.1
    Installed L+C version 2.6
    Enabled checkbox for Use For WordPress Galleries
    Made page, made gallery of attached images
    Gallery settings – link to media file.
    Gallery shortcode looks like this:

    [gallery columns="4" ids="24,25,29,28,26,27,31,30,32,33,37,36,35,34,38,39,40,41,45,44,43,42,46,47,48,49,53,52,50,51,54,55,56,57"]

    How do I add a lightbox attribute to this shortcode?

    Thanks
    ~loothi

    http://wordpress.org/extend/plugins/lightbox-plus/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Tom

    @jeffreeeeey

    add link=”file”, so you end up with something like this:

    [gallery link="file" columns="4" ids="24,25,29,28,26,27,31,30,32,33,37,36,35,34,38,39,40,41,45,44,43,42,46,47,48,49,53,52,50,51,54,55,56,57"]

    I’ve done all the above, but it isn’t working in a lightbox.

    Here’s what I have:

    [gallery link="file" ids="7520,7521,7519,7518,7517,7516,7511,7510,7500,7504"]

    Am I doing something wrong?

    Hi!, I’ve found this hack, with this you don’t need to use any plug-in!
    http://adis.ca/post/wordpress-gallery-shortcode-and-lightbox/

    the code is a little bit confusing, what you need is to add the lines with the “+”.

    What i’ve done is search in my code editor the lines that don’t have the “+”, and when i find it, added the lines.

    With that, you should add to the “[gallery]” shortcode the code rel=”lightbox-thenameyouwant” and link=”file”.

    hope it’s result usefoult to you.

    sorry for my english 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to add lightbox attribute to gallery shortcode?’ is closed to new replies.