Forums

Gallery not working on home page...fine on single (3 posts)

  1. john_nyc
    Member
    Posted 2 years ago #

    Have standard [gallery columns="5"] shortcode for my gallery and it woks perfectly on my sinle post page without issue, but on my home page it is all messed up.
    http://www.celebridiot.com/2009/06/28/megan-fox-leaving-fuse-studios/ - fine
    http://www.celebridiot.com/ - messed up
    I checked the page source and it looks identical Any ideas?????
    <style type='text/css'>
    .gallery {
    margin: auto;
    }
    .gallery-item {
    float: left;
    margin-top: 10px;
    text-align: center;
    width: 20%; }
    .gallery img {
    border: 2px solid #cfcfcf;
    }
    .gallery-caption {
    margin-left: 0;
    }
    </style>

    <!-- see gallery_shortcode() in wp-includes/media.php -->

  2. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    The problem with having multiple galleries within the home page is that the settings for the most recent gallery affect all of the other galleries on the page. Two options:

    1. Don't display galleries on the home page.

    2. Rewrite the gallery shortcode in functions.php to take the CSS out of the page body and place it on the theme's stylesheet instead (where it rightfully belongs) so that you only have 1 CSS block for any and all galleries.

  3. john_nyc
    Member
    Posted 2 years ago #

    I was not aware of that fact that one code impacts all other.

Topic Closed

This topic has been closed to new replies.

About this Topic