• The grid only displays 1 row consisting of 3 posts. The 4th post which I recently added is not shown. I know there’s nothing wrong with the post itself because it’s correctly displayed by the single post template. It’s just not showing up in the grid. Here’s the CSS I added to wp-content/themes/twentynineteen/style.css:

    /* Grid style */
    .display-posts-listing.grid {
    display: grid;
    /* grid-gap: 16px; */
    grid-gap: 4px;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    }

    .display-posts-listing.grid .title {
    display: block;
    }

    .display-posts-listing.grid img {
    display: block;
    max-width: 100%;
    height: auto;
    }

    @media (min-width: 600px) {
    .display-posts-listing.grid {
    grid-template-columns: repeat( 3, 1fr );
    }
    }

    @media (min-width: 1024px) {
    .display-posts-listing.grid {
    grid-template-columns: repeat( 4, 1fr );
    }
    }

    As you can see this includes “grid-template-columns” which was successful for another poster several weeks ago, but it just does not work for me. According to the elementor navigator the structure of the 4th post is identical to all the preceding posts. I also tried experimenting with the section and column widths, but that had no effect. Changing the number of columns in @media has no effect neither. Is this a display-posts bug or am I overlooking something? Thanks for your help.

Viewing 1 replies (of 1 total)
  • Thread Starter nbi1

    (@nbi1)

    Sigh – I’m such an idiot. I forgot about the warnings involving the “featured image”. It’s easy to forget about that because if the post contains an embedded image it will display correctly via the single template. But as far as post grids go the “featured image” is *required*. I need to get into the habit of always setting the “featured image” even if it duplicates the embedded image. Since grids seem to require this I’m not sure why the default simply doesn’t set the “featured image” using the first embedded image.

Viewing 1 replies (of 1 total)

The topic ‘Post Grid not working’ is closed to new replies.