ThemeShaper Forums » Thematic


Wordpress native gallery won't display properly in posts

(12 posts)
  • Started 12 years ago by cconover
  • Latest reply from evis
  • This topic is not resolved


  1. I'm having problems using the Wordpress native gallery feature with Thematic & child themes. When I insert the gallery using a 3 column layout, it will end up only displaying 2 columns, bumping the third image for a given row down to the next line by itself. It will then start over with the next row doing the same thing. You can see an example of a 3 column gallery here:

    The same thing happens with a 4 column gallery, only it leaves 3 images on the first row and bumps the 4th. No matter how many columns there are, it always keeps all but the last image on one row. Here's an example using a 4 column gallery:

    I switched back to the default Twenty Ten theme that comes with Wordpress, which displays the gallery exactly as it's supposed to so the gallery code itself works properly.

    How can I fix this?

    Posted 12 years ago #
  2. The code you posted there didn't work. It broke the theme, causing the page to be totally blank.

    Posted 12 years ago #
  3. tested it (again) works fine.
    took it the code away and had the same problems with gallery columns.

    you already have other code in functions.php ?

    Posted 12 years ago #
  4. Thematic includes plenty of code in functions.php so I'm not sure what you mean. I put the code in exactly as you'd said to in that thread, but it resulted in the site not loading anything.

    Is there something in the Thematic native code that causes this problem?

    Posted 12 years ago #
  5. "Thematic includes plenty of code in functions.php"
    you shouldn't be touching the thematic code. always edit the child theme code.

    instead, only edit child theme code. i see you are using the ninja one theme.
    i downloaded and installed.

    in the folder "ninja-one" edit functions.php

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

    add the above code towards the bottom of the file, just before the closing php tag


    in the folder "ninja-one" edit style.css

    .gallery-item {
    	margin:0 10px 10px 0;
    .gallery-item img {
    	border:solid 2px #ccc;
    .gallery-icon {
    .gallery-caption {

    add that to the bottom of the css file.
    you can obviously change the css to suit.

    i followed these steps, check out the demo
    that was gallery inserted using 3 columns

    let me know how you get on

    Posted 12 years ago #
  6. Well I was editing the Thematic code instead of the child theme code before, so that makes sense why it wouldn't have worked then. However, when I did that to the child theme it ended up putting all the images in a gallery in a single column right down the left side of the page.

    Posted 12 years ago #
  7. you added the code to functions.php
    then added the other code to your style.css file
    both in child theme folder.

    i followed the steps above using the theme you are using and the example shows it works

    i'm sorry but i'm at a loss if it that doesn't work

    Posted 12 years ago #
  8. Yeah, I double-checked & I did it exactly as you said to but it didn't work. Ah well, I'll keep working on it.

    Posted 12 years ago #
  9. email me your css and functions file

    i'll take a look

    Posted 12 years ago #
  10. gretchenlouise

    I had the same problem and finally discovered it was caused by some CSS image padding--found it using Firebug, and easily fixed it in CSS.

    I'd tell you what line it was, however all my galleries have suddenly disappeared, and won't even show up on any of my pages... The single-column display problem was fixed, though, and worked for months with the one CSS fix--not sure what the current bug is. :)

    Posted 12 years ago #
  11. evis

    gretchenlouise: You didn't 'refresh' your memory and remember how you fixed this by any chance?

    I'm using the Thematic theme with Photo-Lover child theme, and have placed several galleries in an album. When opening the album the images in the gallery are placed in just one column. I've set number of columns in the Gallery settings of NextGen Gallery to 0.

    Posted 11 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.