How to Exclude Category From Blog Page

From this tutorial you’ll learn how to exclude or hide post category WordPress from Blog page and to hide the whole category of posts from being viewed.

To hide category WordPress users now are able through several pretty simple actions. Transform your blog page according to your demands, pick the post you need to edit and enjoy WordPress hide category on board.

featured
Excluding Category from Blog Page
  • First, let’s log in to WordPress Dashboard using your login credentials. Then open Appearance >Editor tab on the left of the Dashboard to access your theme editor.hide post category wordpress
  • Select the theme you’re using from the dropdown menu and locate functions.php file in order to make changes in it.hide post category wordpress
  • Before you start to apply changes to the file you have to learn the category ID number. To do it navigate to Posts > Categories tab and hover on the title of the category you want to exclude. You’ll see the ID number at the bottom left corner inside the link (it is a part of it). Exclude Category
  • Now you should add the following lines of code at the very end of the file. Don’t forget to replace the ID number in the code with the actual ID number of the category you need to remove (in our example the ID number is “1”, “-“ tells us that the category should be excluded).
If you want to exclude several categories, you need to learn the ID numbers of both of them and separate them with commas inside the code.
  • Now click on Update button at the bottom of the Editor page. As a result, you won’t see the excluded category on the Posts page anymore.

Our desires are unpredictable and sometimes it happens that the blog page should be turned a bit into the new design. After reading this “how-to” you will know the way to WordPress hide category lifehacks. As you can see the steps are extremely easy and don’t demand any supernatural knowledge.

Using WordPress hide category on the whole page or just post became extremely mild. Only a few soft movements of a mouse and hocus-pocus is on board. Enjoy the simplicity of WordPress hide category.

featured