How to Find WordPress Category Id? ( 2 Easy Way)

If you are working on some plugin or theme development in wordpress or need the category ID for populating some entries in your wordpress, you will need the category ID for such purpose. You might be wondering how to find wordpress category id?

In this article, I will teach you how to find your category in wordpress. Whether you are a novice or advanced user of wordpress, the steps mentioned in this guide will be easy and quick.

How to Find WordPress Category Id

As wordpress is so popular, and there are many ways for achieving your desired result. Similarly, finding the categories there are many ways but we will use two approaches.

The number will be finding the wordpress category without a plugin, and in the second method, we will be using a plugin name as Reveal IDs for finding our Category ID.

The plugin method is recommended if you are looking to find the category ID in bulk. Without plugin methods, it is old school and can be used if you are looking for an individual category ID.

You may Like:

How to Find WordPress Page Id or Post Id

Method 1 ) Find WordPress category Id without Plugin

 The first thing you have to do is log in to your wordpress dashboard. After that, Navigate to Posts > Categories at the left side menu of wordpress.

How to Find WordPress Category Id

The categories overview page will open, listing all the categories you have made so far in wordpress. Now hover over the category title you need the ID for. Once you hover, you will notice a URL appearing at the bottom of the page having the permalink, Plus your category ID you can see in the below screenshot.

Alternatively, you can also find it by clicking on the category URL for which you need the ID for and once open, you will see the category ID in the Browser address bar.

category id number 1

For some reason, if the above method of finding the category ID didn’t work, simply right click on the title of the URL and “copy the link address “or “copy the link location” once copy simple paste it on a notepad or any editor and copy the ID of category from the URL.

Method 2) Find WordPress category Id with Plugin

Find category ID in Reveal IDs Plugin

If you are looking for a way to look the Category id without doing the above steps every time. In that case, you can use the Reveal IDs plugin to display the category ID automatically without doing any manual Steps.

Install the Reveal IDs Plugin by Going to Plugins > Add New in your wordpress dashboard. Search for Reveal IDs plugin in the plugin Search.

Plugin in wordpress dashboard

Install the plugin and activate it. The Reveal IDs doesn’t need any configuration once activated it will automatically be configured.

Plugin for WordPress category id

Now Go to  Posts > Categories in your wordpress dashboard, and you will see the category IDs will be displayed with each category in the ID column

wordpress category id in bulk

Note:  Reveal IDs not only display the category ID but also show the other contents-id like the post, page, comment, user, media, and tag.

How to Find WordPress Category Id

Get Current Category ID in WordPress for an Active Page

If you need to find the current category ID of an active page in wordpress you can use the get_the_category function. For getting this function you can use the code below to get the desired result.

$categories = get_the_category();

$category_id = $categories[0]->cat_ID;

What is the Use of Category ID in WordPress

As you learn how to find the wordpress category ID but r why the category id is helpful to know about and what its uses are.

The category ID keeps in handy when you want to restrict functions of plugins on some categories, so when you give the plugin the category ID, It will limit the plugin function only on that category without affecting the other categories or pages.

For example, you want to restrict the google analytics plugin for tracking the performance of only specific category posts. You can simply assign that category ID without giving all the post URLs. It will save your time, plus you can easily configure it.

If you use a sitemap plugin that is good for SEO, you want to restrict a specific category’s post. In that case, you can also achieve this by only giving the category ID, which is easy compared to manually providing all the post URLs.

Also, if you are designing your website and want to give every category its unique touch, then the category ID will be helpful to apply only the CSS rules to the categories you want without affecting the whole website.

Conclusion

Finding the WordPress category id is a quick and straightforward process, and after reading the article, you will hopefully be able to find the category ID on your wordpress website.

This article covers all the possible methods on how to find wordpress category ID? The Plugin method is recommended practice if you are looking to find the category ID in bulk.

Bilal, a versatile Full Stack Developer and SEO expert, co-founded WebTalkHub. When he's not optimizing websites, you'll find him embracing a fitness routine, diving into books, and exploring new horizons through travel.

Leave a Comment