Exclude a Category from your WordPress Frontpage

In Blog by Jerad Hill1 Comment

On occasion you may write a blog entry that you do not want on your front page but do want under a category. Many themes now a days are including settings you can change to remove categories but if you end up having to hard code it in here is what you need to do.

You will have to create a category that you are going to place these entries into.

Open up the index.php file located inside the folder for your wordpress theme. You will need to replace the #3 in the code below with the id of the category you wish to not include on your front page. If you categorize your entry in more then one category then you will need to not include that category also in which you simply add a comma after the first category number and enter the next category number with no spaces.

wp-remove-category-frontpage

This will not remove the category from the menu. To remove the category from the menu check out my blog on Excluding a Category from your WordPress Menu.

Comments

Leave a Reply