Do not generate gallery markup if no photos

I think that since the `photos` property has been added to the post model, it is an empty array instead of no array at all. 
In the light theme, it generates the markup for the gallery even if it is not needed. I've added a length check.