• I’m hoping someone can help me. I have a photographic web site at:

    For some reason, the images in 2 of my galleries (Landscape and Metal Detecting Finds) are displaying in one column down the middle of the page rather than in a multi-column spread. Any ideas please?

Viewing 2 replies - 1 through 2 (of 2 total)
  • On a page that works, Natural World Gallery, the HTML for your gallery looks like this (I’ve obviously removed most of the gallery items for legibility):

    <div id='gallery-1' class='gallery galleryid-140 gallery-columns-3 gallery-size-thumbnail'>
        <dl class='gallery-item'>
            <dt class='gallery-icon'>
                        <a href='https://www.chrishall-photography.com/wp-content/uploads/2016/01/Whale.jpg' rel="lightbox[140]" title="N1 Humpback Whale"><img width="150" height="150" src="https://www.chrishall-photography.com/wp-content/uploads/2016/01/Whale-150x150.jpg" class="attachment-thumbnail size-thumbnail" alt="N1 Humpback Whale" srcset="https://www.chrishall-photography.com/wp-content/uploads/2016/01/Whale-150x150.jpg 150w, https://www.chrishall-photography.com/wp-content/uploads/2016/01/Whale-45x45.jpg 45w" sizes="(max-width: 150px) 100vw, 150px" /></a>
            </dt>
            <dd class='wp-caption-text gallery-caption'>
                            N1 Humpback Whale
            </dd>
        </dl>
        ...
    </div>

    Which looks valid.
    But on the Landscape and Metal Detecting pages, the gallery HTML is incomplete for some reason:

    <dl class="gallery-item">
        <dt class="gallery-icon"></dt>
    </dl>
    <dl class="gallery-item">
        <dt class="gallery-icon"><!-- see gallery_shortcode() in wp-includes/media.php -->
        <dl class="gallery-item">
            <dt class="gallery-icon">
                <a href="https://www.chrishall-photography.com/metal-detecting-finds/attachment/398152_10150444970785706_9990288_n/"><img class="attachment-thumbnail size-thumbnail" src="https://www.chrishall-photography.com/wp-content/uploads/2016/02/398152_10150444970785706_9990288_n-150x150.jpg" sizes="(max-width: 150px) 100vw, 150px" srcset="https://www.chrishall-photography.com/wp-content/uploads/2016/02/398152_10150444970785706_9990288_n-150x150.jpg 150w, https://www.chrishall-photography.com/wp-content/uploads/2016/02/398152_10150444970785706_9990288_n-45x45.jpg 45w, https://www.chrishall-photography.com/wp-content/uploads/2016/02/398152_10150444970785706_9990288_n.jpg 206w" alt="M1 Philip & Mary sixpence, 1555" width="150" height="150" /></a>
            </dt>
        <dd class="wp-caption-text gallery-caption">
            M1 Philip & Mary sixpence, 1555
        </dd>
    </dl>
    <p>

    There’s no enclosing, parent div such as <div id='gallery-1' class='gallery galleryid-140 gallery-columns-3 gallery-size-thumbnail'>, and there are incomplete HTML tags (that last <p> tag above) and empty gallery items which may also be throwing it out.

    Are you using shortcakes to place these galleries? If so, check that you have entered the shortcake and any attributes correctly.

    Otherwise, if you are cutting and pasting from somewhere else, you have not copied the full, correct block of HTML to form the gallery.

    Thread Starter chall57444

    (@chall57444)

    Hi Neil.

    I’m really grateful to you for taking the time to help. My daughter manages my web site so I’ll forward this to her. The strange thing is, a few days ago all the galleries were looking as they should. I haven’t done anything in the meantime other than add a Blog page.

    Thanks again.

    Chris

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Image view problem’ is closed to new replies.