WordPress Tutorial – Finding Your Category, Page or Post ID

Once you start using WordPress regularly you will probably need to get the ID of your pages, posts or categories. It may be for plugins such as Widget Logic or those displaying Featured Content. Maybe you want to try your hand at customising your templates or sidebars. Regardless, it is relatively easy to find the IDs once you know where to look.

FYI The same rule applies for categories, pages, posts and even tags. In this example we will get the Category IDs for this site.

Step 1: Open the Post Menu

If the Post menu is closed, click on the dropdown arrow to open the box as per the image below.

Step 2: Display Categories List

Click on ‘Categories’ in the Post menu. This will open a page displaying all the categories on your site. The example in the image below are categories on this site.

Step 3: Hover Over the Category Name

To get the Category ID for any category simply hover over the category name. You will see the status bar at the bottom of your browser changes to show information on the category.

In my example I hover over the category named WordPress and the following appears in my browser bar.

The category ID is the number that appears in the browser bar (highlighted in red in the image below). In this example the Category ID for my category WordPress is 37.

Getting Other IDs

You get the IDs for pages, posts and tags in the same way. Go to your Pages list and hover over any page title. The ID will appear in your browser bar at the bottom of your screen.

Plug-Ins To Show IDs

There are a number of handy plug-ins that you can use to display the IDs for you. I’ve used Simply Show IDs in the past and it adds a column to your listings that shows the IDs. There are a number of other plug-ins on WordPress.org that do the same thing so it’s a matter of choice which you go for. You can find these ID plug-ins on this search result on WordPress.org