You are here: / Articles / Guides / Technology / Tips / How to Get the WordPress Category ID

How to Get the WordPress Category ID

WordPress Category ID

Share!



As a beginner to WordPress Themes and the platform in its entirety, You might need to work with the WordPress Category ID directly. This is an ID that uniquely identifies a particular category when it is created. 

The ID remains the constant identifier seeing the category name can be changed any time as well as the slug even though it is not advisable to change the slug for SEO purposes. 

The WordPress API has functions that allow you to retrieve that ID dynamically but that is not so easy when you just need a visual of the same. Do not despair as there is a simple and quick way to get your browser to reveal this ID.

Here’s how to Find the WordPress Category ID

Login to your WordPress dashboard if you already haven’t done so. Next, navigate to the Posts > Categories node from the dashboard menu.

Create the post category that you need to find the ID to if you have not done so already.

On the list of categories, move your mouse onto the category name without clicking it. At this point, the status of the underlying URL will be highlighted at the bottom of your web browser. 

From the highlighted URL at the bottom of the web browser, visuall scan it and find a section that looks something like tag_ID=X where X is the ID of the category. 

WordPress Category Steps

Alternate Copy Link Address Option

There are cases where the browser may not play nice and you may not see the URL highlighted at the bottom of your web browser windows. In this case, you can right-click “Copy Link Address” or “Copy Link Location” depending on your browser. 

You can then paste the URL into your favorite text editor and retrieve the WordPress Category ID from the tag_ID value.

Read Also  Cevelop 1.7.0 Release Available for Download