Find Posts, Pages, Categories, Tags, or User IDs in WordPress
The posts, pages are identified by a unique numerical ID in WordPress but slugs are used in URLs so as to make it more user-friendly. However sometimes you may encounter situations where ID of the posts, pages, categories etc is required. So, in this article we are going to show you how to find the post, page, category, tag, comment or user ID in WordPress. Finding the IDs of all the items are generally similar, however we have described the processes separately which are listed below.
To find the post ID, from the WP admin panel Goto: Posts-> All Posts and then from the lists of the posts, click on the post whose ID is to be determined. Now look a the address bar, the required ID is the number after ‘post=’ in the URL. The post ID is 43 in the image show below.
Determining a post and a page ID is exactly similar, to find the page ID just goto: Pages->All Pages and click on a page whose ID is to determined. Now same as the post ID, page ID is the number after ‘post=’ in the URL.
WordPress default post have categories and tags, but categories and tags can be assigned for Custom Post Types too.
Now to determine the tag ID of the posts, goto: Posts->Tags and from the list of the tags, click on a tag. Now look at the address bar, the required ID is the numerical value after ‘tag_ID=’ in the URL. The tag ID in the image shown below is 5.
Now determining the ID of categories is similar to that of tag ID.
Goto: Comments and edit the required comment, the comment ID is the number in the URL after ‘c=’, which is 1 in the image shown below.
To determine the User ID, goto: Users->All Users and then from the list of users click on one, now as similar to earlier processes the user ID is the numerical value after ‘user_ID=’ in the URL.
But to find you own user ID you need to goto: Users->All Users and then under Posts you can see the number of posts that each user has published, click on the number, now you will be redirected to a page with the lists of posts published by you and in the URL you can see the user ID which is a numerical value after ‘author=’.