I'm using WP 3.9.1 and have added a gallery (Add Media ->Create Gallery -> pick images -> Gallery Settings: Link to Media File.) That works, almost.

The problem is that I need the gallery to use the custom size thumbnails I specified in my functions file. So I go into the text editor and change the gallery shortcode from

[gallery link="file" ids="672,540,537,556,557,541,558,535,555"]


[gallery size="thumbnail" link="file" ids="672,540,537,556,557,541,558,535,555"]

Adding the "size=thumbnail" works. However, it is not easy to do from the Media Manager / Gallery Editor. Am I missing something? I can't ask a client to remember to add this everytime. And what's worse is that any time you ADD photos (or otherwise edit the gallery), you have to switch to the Visual editor to make changes and when you click Update Gallery, it overwrites the "size=thumbnail" that was added. Is there a snippet of code I can add to my functions file to force the size?

  • Take a look at the answer provided here -> wordpress.stackexchange.com/questions/4343/… It's not the same question, but similar. This would let you filter the gallery and change the settings you need, including the image size. – gdaniel Jul 24 '14 at 14:17
  • I saw that option and considered it. But I'd really like to see something that is 3.9 friendly. I could also use a plugin for the photo gallery but that's sort of what I was trying to avoid. However, this does give me the idea of looking at the new 3.9 gallery and what options it offers for filters. Maybe I can find my answer there. – RodeoRamsey Jul 24 '14 at 14:20
  • Yeah. That option is not built in wordpress. You will need a plugin or a filter. I user the plugin advance custom fields together with the extension gallery fields - which let's me add a gallery custom field to any page/post I need. – gdaniel Jul 24 '14 at 14:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.