Hide Certain Posts from Homepage

  • Author
  • #151059


    I am looking for a way to hide certain posts from the main homepage feed. Similar to the question asked here.

    It doesn’t necessarily have to be a specific category (although that would work). But some way to pick and choose certain posts to not appear except by a direct link and/or a menu heading.

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

    Theme Author

    Hi there,

    The best way to exclude posts from your main blog page is by using extra plugins. For example: https://wordpress.org/plugins/ultimate-category-excluder/

    Other than that, you can hide posts with CSS snippet if you’re not able to install plugins:

    .home .type-post.category-objective-player-ratings {
        display: none;

    That will hide all posts from the category with the slug objective-player-ratings. Of course you can adjust the slug to a different category.

    You can copy the CSS code and insert it on Customize > CSS.


    Original poster

    The CSS code worked like a charm. Thanks :)


    Hi Thomas,

    Following on from the question you answered above, I have a few follow-up questions.

    1) I have successfully hidden a category from the homepage using the snippet you provided above, but when I do that the hidden posts are not replaced with other posts, so the number of posts showing on the homepage becomes much less, leading to a lot of unwanted white space. Is there a way to replace the hidden posts with other posts so the homepage remains fully populated?

    2) Is it possible to hide specific individual posts from the homepage, but so they do still appear in Categories?

    3) Is there a limit to the number of posts that you can stick (pin) to the homepage?

    Many thanks,


    Original poster

    Would also be curious to hear the answer to question 1 :)

    Theme Author

    Hi there,

    1) Yes, that is possible by really removing the posts from the page by using the plugin: https://wordpress.org/plugins/ultimate-category-excluder/

    With CSS, the post is just hidden afterwards, but actually exists in the HTML markup.

    2) The plugin allows to exclude posts from a specific category just on the front page, but not in categories.

    3) There is no limit, but sticky posts work outside of the normal post query, so if you stick 50 posts then your home page will show 50 posts and then the default 10 posts on top of that. In general, I recommend not to make more than 1-2 posts sticky.


  • The topic ‘Hide Certain Posts from Homepage’ is closed to new replies.