• Hi, I’m working with Roots theme, I found that the gallery short code is not working right with this theme. When I looked into the source code, the style sheet for gallery was not generated. I’m wondering what might cause this.

    As I know from this post, the gellery short code should generate a style sheet like this:

    <style type='text/css'>
     #gallery-1 {
         margin: auto;
    }
     #gallery-1 .gallery-item {
         float: left;
         margin-top: 10px;
         text-align: center;
         width: 20%;
    }
     #gallery-1 img {
         border: 2px solid #CFCFCF;
    }
     #gallery-1 .gallery-caption {
         margin-left: 0;
     }
    </style>

    Here is the demo page of Roots theme, as you can see in the demo, gallery columns are not working as it should be. Anyone know how to fix this? I hope I can have the gallery code work as it is in Twenty Twelve theme.

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

    (@zacklive)

    I’ve figured it out, I have to commented this line in /lib/cleanup.php to use native gallery style sheet.

    //add_filter('use_default_gallery_style', '__return_null');

Viewing 1 replies (of 1 total)

The topic ‘Gallery Short code not working for my theme’ is closed to new replies.