Add 'rel="lightbox[PostID]"' to each thumbnail link in Gallery
-
Want to alter the wp-includes –>media.php code to auto generate rel=”lightbox[PostID]” when creating a gallery in a post so each image opens in a lightbox.
Don’t know ANY php, but think the line of code I need to alter is line 854:
$link = isset($attr[‘link’]) && ‘file’ == $attr[‘link’] ? wp_get_attachment_link($id, $size, false, false) : wp_get_attachment_link($id, $size, true, false);I can get the rel=”lightbox[PostID]” added to the img src but not the preceding a href where it must be.
Any help from a WP php guru would be greatly appreciated and would teach me something about php!
I always add every image on my blog individually so they open in a lightbox. I would LOVE to use the WP gallery but it does not add the rel=lightbox to the gallery code. ??
- The topic ‘Add 'rel="lightbox[PostID]"' to each thumbnail link in Gallery’ is closed to new replies.