• Hi,

    I’m testing out the build in photo gallery of WP and this is great feature, but still there’s one thing that is annoying me when I’m styling my images.

    When I add a gallery with let’s say 10 images, they appear on the page with each image a border of about 2 pixels, that is messin up my design, I’ve checked with firebug and I see that there’s an ID that does this.

    Now I’ve added this ID to my CSS file, but it’s been overridden by the I think default gallery css. How can I solve this?

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Unless you provide a link to a page demonstrating the problem, no one will be able to offer much in the way of specific help.

    Thread Starter yaeko

    (@yaeko)

    Well I can’t give a demo link yet, the server isn’t online yet.

    But I’ve managed to remove the embedded style that WP generates by using this code:

    add_filter('gallery_style',
        create_function(
            '$css',
            'return preg_replace("#<style type=\'text/css\'>(.*?)</style>#s", "", $css);'
            )
        );

    Now, this is working like a charm but there’s still one thing that need some tweeking. My client wants the latest 6 images from the last gallery that he would upload, I’ve understand that I can include and exclude image using the id in the short_code, but since it’s going change al the time how can I make this dynamic? Or should I use another plugin for this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Standard photo gallery question’ is closed to new replies.