Have you ever found yourself in a situation where you had to know a specific WordPress post ID, page ID, category ID, tag ID, comment ID, or user ID?
While working on WordPress, you may need these IDs to add certain features on your website. Some WordPress themes or plugins may ask you for these IDs to enable or disable certain functions.
If you are wondering what an ID is, it is a unique number which identifies a particular item in your WordPress database. Each post, page, category, tag, comment, and user in WordPress have their unique ID.
In this article, we will show you how to find a post, category, tag, comments, or user ID in WordPress.
How to Find Your WordPress Post ID and Page ID?
In WordPress, posts and pages are two main ways to add content. The posts are mainly used for timely articles, whereas pages are used for static content.
Sometimes you may want to filter your posts and pages or exclude them from certain features. In such a scenario, you may need your post and page IDs.
Let’s start with looking at how to find a post ID in WordPress.
From the WordPress admin panel, go to Posts » All Posts page and locate the post whose ID you need.
The easiest way to view your post ID is to hover your mouse over the post title.
When you do that, your post edit URL will appear at the bottom left-hand corner of your screen. Now, take a look at the number that comes between ‘post=’ and ‘&action.’
You got it! That’s your WordPress post ID.
It is 5 in the example above.
You can view your WordPress post ID also in the post editor screen. When you open a post to edit, the post edit URL will appear in your browser’s address.
It is the same URL which had appeared in the popup box when there was mouse hover on the post title.
So the number that comes after ‘post=’ and before ‘&action’ is the post ID.
Now you can use the same method to find your WordPress page ID as well. The only difference is that you have to go to the Pages menu instead of Posts.
For example, the page ID in the above screenshot above is 32.
How to Find Your WordPress Category ID and Tag ID?
Categories and tags are used for sorting content in WordPress.
Sometimes, you may need to find a category or tag ID to add a plugin feature.
Finding a WordPress category ID, tag ID or another custom taxonomy ID in WordPress is very similar to finding a post ID.
Let’s take a look at it.
First, you need to visit Posts » Categories from your WordPress admin panel. When you can see the list of your categories, hover your mouse over the category title whose ID you are looking for.
Now you can see the category edit URL appear on a popup box at the bottom left corner of your screen.
Your category ID is right there in the URL. It is the number that comes after ‘category&tag_ID=’ and before ‘&post_type’. In the screenshot above, your WordPress category ID is 2.
You can also view your WordPress category ID by editing it. Simply open a category to edit, and you’ll see the category ID in the browser’s address bar.
It is the same URL which appeared when there was mouse hover on your category title. It means that the category ID is the number between ‘category&tag_ID=’ and ‘&post_type’, which is 2.
You may notice that even though we are editing a category, WordPress still displays category ID as tag_ID. Don’t get confused by this.
Now you can find your WordPress tag ID also in a similar way. Visit Posts » Tags, and then hover the mouse over the tag whose ID you want to view.
Once done, your tag edit URL will appear at the bottom left corner of the screen.
In the URL, the unique number between ‘tag&tag_ID=’ and ‘&post_type’ is your tag ID. In the screenshot above, 9 is your tag ID.
How to Find a Comment ID in WordPress?
To find a comment’s ID, the first thing you need to do is go to the Comments section in your WordPress admin panel. After that, you will see a list of the comments on your site.
Simply hover your mouse over the ‘Edit’ link under the desired comment. Next, you will see the comment edit URL at the bottom left corner of your screen.
Your WordPress comment ID is right there at the end of the URL, after the ‘editcomment&c=.’ In the above screenshot, your comment ID is 4.
Similar to posts, pages, categories, and tags, you can also open the comment editor page to view your comment ID.
On the comment editor page, you can find your comment ID at the end of the comment edit URL.
How to Find a User ID in WordPress?
Just like other items we discussed above, you can also find a user ID by looking at the user editing URL or by editing it.
Go to Users » All users and hover your mouse over the user name. WordPress will show the user edit URL in a small popup box at the bottom left corner of your screen.
The number that comes after ‘user_id=’ and before ‘&wp’ is your WordPress user ID. In the screenshot above, the user ID is 3.
You can find a user ID also in the user editor page. Click on the Edit link under a user name. Next, WordPress will open the user’s profile, and you can get the user ID from the browser’s address bar.
If you are trying to find out your own user ID, then WordPress will open the profile editor without a user ID in the URL.
To find your own user ID, go to Users » All Users. WordPress will display a list of authors with the number of posts they have written next to it.
Hover the mouse over the number of posts you have written, and you will be able to see your author edit URL at the bottom left corner of the screen. The URL includes your author ID.
Alternatively, you can click on the number of posts you have written, and then WordPress will redirect you to a page that lists all posts written by you. Here, you can get the user ID from browser’s address bar because it will be displayed as an author, like this:
In this example, the user (author) ID is 1.
We hope this article helped you find the post, category, tag, comments, and user ID in WordPress. You may also want to see our guide on how to do basic image editing in WordPress (crop, rotate, scale, flip).