How to Locate Category IDs
In this article, we're going to explain how to locate category IDs in our themes.
What Are Category IDs For
Our themes might require you to enter in the IDs of categories that you would like to feature in different sections of functionality (i.e. Filterable Index). If you have chosen to take advantage of these options you'll find that it is incredibly easy to locate the ID of your categories in WordPress. Below we'll take some time to walk you through this process to ensure that you are able to do so if needed.
Locating the ID
To find the ID of a category, first you'll need to navigate to your categories listing page in the WordPress admin by going to Posts > Categories. Once you have arrived at this page, you'll see a list of your categories like so:
The simpler method of this procedure would be to simply hover over the link of the category that you're interested in getting the ID from (e.g. Music from the above image). Doing so should display the URL of this page in the lower left corner of your browser window. This will look a little different in each browser, but in Chrome it will look something like this:
The thing to to take note of in this particular URL is the value of the tag_ID query string. Note that for this example the value is 14, which is the ID for this category. If you're having trouble locating the URL in the lower left corner of your browser, click on the link to the category edit screen of the category that you want to get the ID from in WordPress. Once you're on the category edit screen for that category, look up at the address bar in your browser and you should see something like the following:
Note that we're still looking for the same tag_ID query string and the value associated with it, which in this case is still 14. That's all there is to it, simply take note of this value and use it where needed in the theme.
Summary
Now you are able to easily identify the category ID inside your WordPress installation.
See something inaccurate? Let us know