I've tried looking up but I cannot seem to find the following...

What must I include in functions.php and in style.css to have the default Worpdress gallery working?

I have a new Wordpress theme, totally custom, and I've removed everything from functions.php. However, now, the gallery images do not open in a popup like they should and I don't quite like the way the images are resized also.

So could you please help me with a suggestion on what styles/functions I must include to have the Wordpress gallery functioning correctly?

OR - if you could suggest a lightweight alternative plugin to the default Wordpress gallery?

Many thanks.

  • 1
    Why would you remove everything from functions.php. Just for example, the gallery uses thumbnails, theme support that needs to be activated in your theme, and almost certainly always are in your functions.php. Commented Apr 8, 2014 at 11:30
  • It is a custom (skeleton) Wordpress theme, therefore I am not using the twentyfourteen functions as they are called somewhere else in the theme nevertheless. Probably the best way to describe things was "I removed everything in functions.php that belongs to the twentyfourteen theme".
    – julia
    Commented Apr 8, 2014 at 13:44
  • codex.wordpress.org/Javascript_Reference/ThickBox
    – knif3r
    Commented Jul 12, 2016 at 20:45

1 Answer 1


I got the gallery working like I wanted to, using the following plugin:


Also, if I will have time, I will apply the information in this article:


Furthermore: with this answer I no longer need the default Wordpress gallery styles because I can customize the gallery myself.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.