How to Show Only One Category on Your WordPress Homepage

If you’d like to show posts from only one category on your homepage, then it’s easy enough to do.

We’ll go over the steps below.

Find Your Category ID

First find the category ID number of the category you want to show up. You can do this by mousing over the category title (Posts > Categories), and then look in the bottom of your browser. You should see the category ID among a string of other messy info.

In this example, the category is 11.

You can also use a plugin that will give you different IDs in your Admin area.

Insert Code

Once you have your category ID, put that into the following code, which should go into your functions file. (Appearances > Editor > Theme Functions – functions.php)

As you’ll be changing your theme’s function file, it would be wise to use a child theme.

In the example code below, I’m using category ID number 11. Replace that with your category ID.