Have you ever found yourself in a situation where you had to find a WordPress page ID, post ID, category ID, tag ID, comment ID, or user ID?
While working on WordPress, you may need these IDs to add certain features to your website. An ID is a unique number that identifies a particular item in your WordPress database. Each post, page, category, tag, comment, and user in WordPress has its unique ID.
In this article, we will show you how to find a post, category, tag, comments, or user ID in WordPress.
When Do You Need to Use Post ID and Page ID in WordPress?
WordPress uses a unique identification number for each blog post, landing page, comment, user, category, and tag on your website.
Finding this information is important if you’re using a WordPress plugin that requires a specific ID for a page or post to add a feature or a visual effect. For example, you can use a plugin to add subtitles for posts and pages using the respective post ID and page ID.
Similarly, let’s say you want to hide a specific WordPress post from your homepage. You’ll need the exact page ID and post ID to remove them from appearing on your homepage.
That said, let’s see how you can find page ID and post ID in WordPress. To help you navigate our guide smoothly, you can click the link below and jump ahead to any section.
- How to Find Post ID and Page ID in WordPress
- How to Find Your WordPress Category ID and Tag ID
- How to Find a Comment ID in WordPress
- How to Find a User ID in WordPress
How to Find Post ID and Page ID in WordPress
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 on your WordPress blog.
From the WordPress admin panel, go to the 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 25 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 that had appeared at the bottom of the screen when you hovered your mouse on the post title.
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 7.
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 5.
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 that appeared when there was a 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 the 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 2.
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 the user.
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 2.
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 the 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).