Making Home page a Category Page

  • I wanted to make my home page only feature articles that are categorized. I used the following CSS to do this:

    .home article {
    display: none;
    }

    .home article.category-news {
    display: block;
    }

    .category .page-title {
    display: none;
    }

    It worked perfectly, and non-categorized articles do not appear on the home page. However, it created a blank spot on my list of recent posts. I have a 3×4 column of latest posts on my home page, and every time I make an uncategorized post, one of those 3×4 boxes for a post is just blank, creating a large space in between articles.

    What would be the best way to close this space?

    Thanks.

    The blog I need help with is: (visible only to logged in users)

  • Are you using wordpress.com, or wordpress.org?

  • Added the following to the code:

    /* fix alignment of posts on blog page | XXXXXXX-hc eD */
    .blog #posts-wrapper {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    }

    /* make sure older posts button on blog page is set beneath the posts list | XXXXXX-hc eD */
    .blog #posts-wrapper #infinite-handle {
    flex-basis: 100%;
    }

    This helped push the blank space to the bottom of the list, but nonetheless the blank space is still there. Any ideas to completely remove it?

  • Please kindly wait and a staff member will take over from here. I hope that you have a good week end.

    Regards: @storygenie5

  • I’m not seeing any excessive blank space at https://thehaywire.org/

    Were you able to correct this?

  • The topic ‘Making Home page a Category Page’ is closed to new replies.