Title: [gallery] shortcode problem on theme
Last modified: August 19, 2016

---

# [gallery] shortcode problem on theme

 *  [alphaoneweb](https://wordpress.org/support/users/alphaoneweb/)
 * (@alphaoneweb)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/gallery-shortcode-problem-on-theme/)
 * Hi everyone,
 * I’ve a problem with any kind of gallery shortcode.
 * When I try to insert into any of my posts the [gallery] shortcode it seems does
   not work….
 * I’ve tried also with NextGen Gallery…i’ve inserted its shortcode but nothing 
   I can show that on my frontend page.
 * if I try to change my theme it works…
 * any Idea??? Where can I check the code or something like that?
 * Thanks for your reply.

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/gallery-shortcode-problem-on-theme/#post-1511053)
 * What part about it “does not work”?
 *  Thread Starter [alphaoneweb](https://wordpress.org/support/users/alphaoneweb/)
 * (@alphaoneweb)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/gallery-shortcode-problem-on-theme/#post-1511392)
 * Here’s an example of the generated code:
 * =====================
    POST: =====================
 * <!– MAIN –>
    <div id=”main” class=”clear”>
 * <!– MAIN BAR–>
    <div id=”mainbar”> <p><span class=”top_more_fix”></span></p>
 * <div class=”post-text”>
 * test
    test test
 * [gallery columns="5" orderby="rand"] </div>
 * <div class=”rule”></div>
 * <div class=”post-info”>
    <small>
 * . </small>
 * <small>Tags: test, test
    Posted in test | test</small>
 * </div>
 * <div class=”rule”></div>
 * <!– You can start editing here. –>
 * <!– If comments are closed. –>
 * </div><!– /#mainbar –>
 * =====================
    PAGE: =====================
 * <!– MAIN –>
    <div id=”main” class=”clear”> <!– MAIN BAR–> <div id=”mainbar”> 
   <p><span class=”top_more_fix”></span></p>
 * <p><span id=”more-5″></span></p>
    <p>example test</p> <p>test test</p>
 * <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> <!– see gallery_shortcode() in wp-includes/media.php –> <div id=’gallery-
   1′ class=’gallery galleryid-5′><dl class=’gallery-item’> <dt class=’gallery-icon’
   >
 * </dt></dl><dl class=’gallery-item’>
    <dt class=’gallery-icon’>
 * </dt></dl><br style=”clear: both” />
    <br style=’clear: both;’ /> </div>
 * </div><!– /#mainbar –>
 *  Thread Starter [alphaoneweb](https://wordpress.org/support/users/alphaoneweb/)
 * (@alphaoneweb)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/gallery-shortcode-problem-on-theme/#post-1511393)
 * Here is a screenshot sample of my problem…
 * gallery in a page:
    [http://www.alphaoneweb.com/wp-content/uploads/2010/05/2010-05-31_1243.png](http://www.alphaoneweb.com/wp-content/uploads/2010/05/2010-05-31_1243.png)
 * gallery in a post:
    [http://www.alphaoneweb.com/wp-content/uploads/2010/05/2010-05-31_1228.png](http://www.alphaoneweb.com/wp-content/uploads/2010/05/2010-05-31_1228.png)
 * Thanks for your help
 *  [vikingjs](https://wordpress.org/support/users/vikingjs/)
 * (@vikingjs)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/gallery-shortcode-problem-on-theme/#post-1511446)
 * I am having a similar problem. I created galleries in WP 2.7, and they worked
   fine. Now I’ve noticed that some don’t work anymore, possible since I updated
   to WordPress 3, but I can’t be certain of that.
 * When I look at the source code for the page I can see that the shortcode handler
   was invoked, and a div was created with dl tags for each gallery item, but there
   are no images or any links to the images’ urls.
 * When I click the image upload button for one of the broken posts, I can see that
   there are nine images already uploaded in the gallery. Their thumbnails show 
   in the window and the data seems correct.
 * Any clues how I can go about making these things work?

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘[gallery] shortcode problem on theme’ is closed to new replies.

## Tags

 * [gallery](https://wordpress.org/support/topic-tag/gallery/)
 * [nextgen](https://wordpress.org/support/topic-tag/nextgen/)
 * [shortcode](https://wordpress.org/support/topic-tag/shortcode/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 3 participants
 * Last reply from: [vikingjs](https://wordpress.org/support/users/vikingjs/)
 * Last activity: [15 years, 8 months ago](https://wordpress.org/support/topic/gallery-shortcode-problem-on-theme/#post-1511446)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
