WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] 2.5 gallery: link thumbnail to original image? (7 posts)

  1. mnogueir
    Member
    Posted 6 years ago #

    Hello there!

    Using the new gallery shortcode, is there any way to link directly from the thumbnail to the original image, instead of opening another page with the medium sized image?

    Thanks

  2. mnogueir
    Member
    Posted 6 years ago #

    Just found this info somewhere:

    it's very easy to set lighbox with the 2.5 galleries:

    just install lightbox and lightbox-auto.

    then activate them and edit media.php in the wp-includes dir:

    The line number 394 is as follows in 2.5:

    $link = wp_get_attachment_link($id, $size, true);

    change it to:

    $link = wp_get_attachment_link($id, $size, false);

    and it should work!

    I tried, and it did work. Maybe this could be coded as an option on the admin?

  3. marysorens
    Member
    Posted 6 years ago #

    This solution is unclear - can anyone clarify it?

    When you say "install lightbox and lightbox auto," which plugins are you referring to? I found only one called Lightbox JS v2.0.4. Is that the correct lightbox plugin? What is lightbox auto?

    I am hating this thumbnail that clicks over to a medium sized image. Ugh!

    Thanks,
    Mary

  4. marysorens
    Member
    Posted 6 years ago #

    Perhaps there is an easier solution for me...is there a way to change the max width and height of the medium image? I'm looking around but can't figure it out.

    Thanks!

  5. mnogueir
    Member
    Posted 6 years ago #

    Sorry, I copyed and pasted from another article. FOrget about the lightbox plugins. The solution to skip the medium sized image is just the change to the media.php file...

  6. slambert
    Member
    Posted 6 years ago #

    changing that line in media.php does work, but it's far from ideal because as soon as wordpress is updated, that modification is lost. There must be a better solution.

    Who marked this thread resolved?

  7. hawkwood
    Member
    Posted 6 years ago #

    I just released a plugin, gallery-plus, that can add the lightbox attribute to the gallery. You need to install the lightbox 2 plugin also. I personally use version 2.6.0.

Topic Closed

This topic has been closed to new replies.

About this Topic