For each new post you want to hide from the homepage, you just have to add its ID to the array.
How to Hide a WordPress Post From Your Homepage Using a Plugin
If you’re a beginner, then you may want to use a plugin to avoid coding altogether. With the WP Hide Post plugin, you can control whether a post appears on your home page with one mouse click.
After installing and activating the plugin, edit the post you want to hide. There will be a new “Hide Posts” section in the right column of the editor. There you can check the box labeled “hide on frontpage” and save your changes.
Once you select this box, the post will be hidden on your homepage but visitors can still find it in other parts of your site. Easy, right?
Whichever method you choose, you can quickly and easily hide a post from the homepage of your WordPress site. This will help ensure that you control the visitor experience on your site from the very first touchpoint.
Originally published Oct 25, 2019 11:59:56 AM, updated March 23 2020