Post Thumbnail Display Issue (5 posts)

  1. Amber
    Posted 5 years ago #

    I'm still fairly new to the creating WordPress Themes, I'm trying to include the post thumbnail with my loop but I'm running into an issue, and I tried searching for a solution but haven't been able to find one.

    I have enabled my theme to use post thumbnails and have used the call on my custom page but what is happening is if for some reason a post isn't given a thumbnail it causes the post that does have a thumbnail to push up to the next recent article so for example if i have (most current post at the top):

    Post 1 - no thumbnail
    Post 2 - thumbnail
    Post 3 - no thumbnail
    Post 4 - thumbnail

    it ends up displaying like:

    Post 1 - thumbnail from post 2
    Post 2 - no thumbnail
    Post 3 - thumbnail from post 4
    Post 4- no thumbnail

    my code for the page is as follows:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    Could someone point me in the right direction of how to correct this?

  2. Michael
    Forum Moderator
    Posted 5 years ago #

    this might be a css issue - please post a link to your site.

  3. Amber
    Posted 5 years ago #

    It might be something with the CSS but I tried a few different ways and couldn't seem to fix it. @_@

    Here is a link to the testing site:


  4. Michael
    Forum Moderator
    Posted 5 years ago #

    try and add a 'float:left;' to this style:

    /* == POSTS == */
    article[id*=post-] {
    	padding: 10px 0;

    not widely tested, hopefully this does not cause any problems elsewhere.

  5. Amber
    Posted 5 years ago #

    thanks alchymyth that appears to have worked. I tried numerous other CSS values but didn't think to add a float to the article[id*=post-].

    just out of curiosity would there have been a better way to achieve the end style (thumbnail to the left of the post) than what I currently just did?

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.