SPECIAL OFFER Get 30% OFF on All Qode Plugins Discount code: WOOCOMMERCE30 SPECIAL OFFER Get 30% OFF on All Qode Plugins Discount code: WOOCOMMERCE30 SPECIAL OFFER Get 30% OFF on All Qode Plugins Discount code: WOOCOMMERCE30
SPECIAL OFFER Get 30% OFF on All Qode Plugins Discount code: WOOCOMMERCE30 SPECIAL OFFER Get 30% OFF on All Qode Plugins Discount code: WOOCOMMERCE30 SPECIAL OFFER Get 30% OFF on All Qode Plugins Discount code: WOOCOMMERCE30
BACK TO TOP

How to Find Post, Page, Category, Comment and User ID in WordPress

How to Find Post, Page, Category, Comment and User ID in WordPress

An ID in WordPress represents a unique number that is used to classify specific items in the WordPress database. Almost every WordPress user needs this number at some point – usually cases where a WordPress theme or a plugin asks you about it in order to perform a particular function. The ID may also be required when you’re altering some code. Different pages, posts, categories, comments and users in WordPress all have their own ID, which is why we’ve decided to show you how you can find all these different ID types.

Finding a Post ID

There are two ways you can find a post ID in WordPress:

1. Hover on the post : you can do this by accessing Posts > All Posts, and then moving your cursor over the post whose ID you’re interested in. Upon doing so, a bar will appear at the bottom of the page, and the post ID will be displayed at the bottom of the screen as the number after post= and before &.
Hover on the post
2. When you click on the post itself : once you do this, the post ID will show up in your browser address bar as part of the URL (post=number).
ID will show up in your browser address

Finding a Page ID

Just like with the post ID, you can see the page ID by hovering on the page in the Pages list (Pages > All pages), or in the page’s URL.

See the page ID
Finding a Page ID

Finding a Category ID

Like in the previous two cases, you can find the category ID you’re interested in by either hovering on the specific category in Posts > Categories and looking for the ID=number, or finding it in the category’s URL.

WordPress Category
Finding a Category ID

Finding a Comment ID

When you access the Comments screen from your Dashboard menu, you will be able to see the comment ID by hovering on the specific comment. The ID will be displayed as c=number.

Access the Comments screen

Similarly to other instances, an alternative option is to click on the Edit button below the comment in question and view the comment ID in the URL.

Finding a Comment ID

Finding a User ID

As for the user ID, you can find it when you access Users > All Users, and hover on the Delete button under that particular user. The only user that has no Delete button is the Admin, and their ID is always the same (user_id=1).

Finding a User ID

Additionally, you can also view the user ID by clicking on their name.

View the user ID by clicking on their name
Qode WordPress Themes: Top Picks
Bridge WordPress Theme Banner
Bridge

Creative Multi-Purpose WordPress Theme

Stockholm WordPress Theme
Stockholm

A Genuinely Multi-Concept Theme

Startit WordPress Theme
Startit

Fresh Startup Business Theme

Biagiott banneri
Biagiotti

Beauty and Cosmetics Shop

Displaying IDs in WordPress Using the Show IDs Plugin

Show IDs Plugin

Despite it being fairly easy to find the ID in WordPress by using the methods discussed above, an even faster way to do it is to install the Show IDs plugin by 99 Robots. A great thing about this lightweight plugin is that once it’s installed, it will create an extra column in the lists of pages, posts, categories, comments and users. This column is where all the IDs will be displayed automatically, so there’s no need to configure anything within the plugin to make it work.

Show IDs plugin by 99 Robots

Conclusion

And there you have it – a simple way to find or display post, page, category, comment and user ID in WordPress. Even though the instances where you’ll need to find these IDs may not be so frequent, it’ll be useful to know how to do it once they occur. Plus, you now have a choice of different methods for obtaining the ID, so you can pick the one that works the best for you.

Post your comment

Comments0