ThemeShaper Forums » Thematic

[closed]

4 Columns on native Wordpress image galleries

(7 posts)
  • Started 3 years ago by paualvarado
  • Latest reply from Jonny Janiero
  • This topic is not resolved
  1. Hey, I tried to find this but haven't been able to, what do I need to modify to be able to have wordpress native image galleries with four thumbnails? Now when I put this code: [gallery columns="4"]

    it looks broken:
    http://bainspiration.com/2010/06/15/nyc-inspiration-–-renegade-craft-fair-brooklyn-ii/

    thanks in advance!

    Posted 3 years ago #
  2. The problem is that it puts a break with a clear both in after each gallery.
    You could try something like this in your css.

    .gallery br{
    clear:none!important;
    float:left;
    }

    Posted 3 years ago #
  3. my advice when styling native wordpress gallery...

    in your functions.php place this

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

    this will remove any wordpress styling...
    then you can use the following in your css

    .gallery {
    
    }
    .gallery-item {
    
    }
    .gallery-icon {
    }

    or use firefug.

    i used the above on a child theme i'm working on
    http://www.arrival.virtualpudding.com/?p=20
    i've tested 3, 4 and 5 columns and it works fine.
    hope this helps.

    Posted 3 years ago #
  4. oh, also

    .gallery-caption

    if you plan to include captions

    Posted 3 years ago #
  5. Thanks a lot! I'll try these and will let you know. cheers!

    Posted 3 years ago #
  6. Hey there, none of these worked..

    @Jonny-Janiero I think there might be some typo in the code you copied since when I copy it in the functions file it adds some code in my header..

    Any other ideas?

    Posted 3 years ago #
  7. code in your header? it really shouldn't do that.
    i've double checked the code and works fine for me.

    Posted 3 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.