I agree.
Clicking a photo to go to another page and then clicking the photo to see it full size is a real PITA. I’m sure someone knows how to tweak it.
Please?
I think this guy has got it doing something similar to what you are looking for.
http://paulstamatiou.com/2008/03/29/wordpress-25-gallery-test
Yes, please. Some more documentation for changing the way [gallery] works!
Thread Starter
neilb
(@neilb)
Thanks! I didn’t know there was an image.php as a template – probably because I’m an idiot. Now off to do stupid things in dumb ways.
I still wish there was more ways to tweak the gallery and where images link but this will work for now. 🙂
I’ve been trying to accomplish the same thing, ie get the gallery link to link to the image itself. I think I found where the [gallery] shortcode is defined : wp-includes/media.php, line 333. The target of the link is being defined in line 394 apparently :
$link = wp_get_attachment_link($id, $size, true);
I haven’t had time to figure out how to replace this with the url of the image itself..
in wp-includes/post-template.php, i altered the wp_get_attachment_link function so that my images link to the files and not to an image page.
on line 382, i changed
$url = get_attachment_link($_post->ID);
to
$url = wp_get_attachment_url($_post->ID);
not sure if there is a better way to do it ? but this is a start..
So, this is my solution for a WP-gallery. Not the best, but as bkuzma said – a start.
on line 382, i changed
$url = get_attachment_link($_post->ID);
to
$url = wp_get_attachment_url($_post->ID);
Ah, thanks! I’ve been wanting to figure out how to do this. I wish there were a nicer, less hack-ish way to go about it, but this will work for now. Couldn’t figure out how to do it with a plugin.
In version 2.5.1 not work 🙁
As a matter of fact, that hack works in 2.5.1