This is a guide on how to exclude a blog category from a blog page in WordPress. I hide my Web Blog posts from the Tech Blog area, so this is a useful one to note down.
First we need to get the Category tag_ID, which can be gained by hovering over the category link as shown.
Next up, we need to insert some code at the of our functions.php file.
This can be done via Appearance > Theme Editor as above, but I wouldn’t recommend it. When I first started out this used to work for me, but one day that failed…
I had to use FTP to view the files, to then notice that the functions.php file was empty! I restored the file using the one I had from the original download of my theme. The front-end to my website was unavailable for about 2 hours that night.
For this post, I’ve tested a quick code update using the WordPress Theme Editor again to see what would happen. When I clicked to update there was an endless loading symbol.
When I refreshed the page I could see that my code update had not been saved.
I think that confirms it – We should always use an FTP application like FileZilla to update the /public_html/wp-includes/functions.php file.