• Resolved sgreve

    (@sgreve)


    Hey everybody,

    I’m using the gallery shortcode in my template. Right now I have my shortcode set to make each thumbnail link to its original image, but I need to tweak this slightly.

    Is there a way to tweak the shortcode so it links each thumbnail to a specified post-thumbnail size image instead of the original?

    I’m thinking the easiest way to accomplish this is to just append the size to the URL (ex: image.jpg becomes image-300×300.jpg), but I’m too much of a php noob to know how to do that.

    Anybody have any ideas?

Viewing 1 replies (of 1 total)
  • Thread Starter sgreve

    (@sgreve)

    Ack, I had a total brainfart and forgot about template hierarchy.

    In case anybody finds themselves in the same situation: just make a template file called attachment.php, WordPress will automatically use that file as a template for displaying your images.

Viewing 1 replies (of 1 total)
  • The topic ‘Make gallery shortcode link to custom image size?’ is closed to new replies.