could you please tell me where to put the above code exactly? I have no clue about php. I tried but caused errors.
If you do not feel comfortable editing PHP files, you can use this plugin instead:
And is it possible to force the gallery to make 3 or 4 columns? I always get 2 columns only, thus the gallery becomes too big, needs lots of scrolling.
f you choose a Tiled Gallery type, Jetpack automatically calculates the number of columns based on your theme's content width, and on the number and size of your images.
For example, if you were to upload more portrait images, you'd get more columns than if you were to use landscape pictures.
You can't consequently change the number of columns, unless you use the "Thumbnail Grid" gallery type. Then, the column option will appear again.