Lightbox Plus Colorbox
How to add lightbox attribute to gallery shortcode? (4 posts)

  1. loothi
    Posted 2 years ago #

    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?



  2. Tom
    Posted 2 years ago #

    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"]

  3. fouldsy99
    Posted 2 years ago #

    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?

  4. CrimsonJujuy
    Posted 2 years ago #

    Hi!, I've found this hack, with this you don't need to use any plug-in!

    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 :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Lightbox Plus Colorbox
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic