How to Find Post and Page ID on WordPress

In this post, we will see the steps to find the post, page, category, tag, attachment (media), menu, comment, and user ID on WordPress.

Without any delay, let’s see how.

Find Post ID

Go the “Posts” section and open the post for which you want to find the ID.

After you opened the post, take a look at the Address Bar.

The number after the “post=” is the ID of the post. In this instance, the post ID is 5.

Post ID

Alternatively, you can do the same task by hovering the mouse over the “Edit” link of the post on the “Posts” section. When you do that, you can see the post ID in the URL which you can see at the bottom left of the screen.

Note: You can also apply the above methods for custom post types.

Find Page ID

Go to the “Pages” section and then apply all the above steps to find page ID.

Find Category ID

Go to the Posts > Categories. Now, you can see all the categories of your WordPress blog.

Click the category for which you want to know ID.

Now, you need to look the Address Bar where you can see a number after “tag_ID=.” That number is called the ID of the category. In our instance, the category ID is 3.

Category ID

Alternatively, you can do the same task by hovering the mouse over the “Edit” link of the category on the “Categories” section. Now, you can see the Category ID in the URL which you can find at the bottom left of the screen.

Find Tag ID

Go to Posts > Tags. Now, you can see all the tags on your WordPress blog.

Click the tag for which you want to know ID.

Now, take a look at Address Bar and the number you find after “tag_ID=” is the ID of that tag. In this case, the Tag ID is 4.

Tag ID

Alternatively, you can do the same task by hovering the mouse over the “Edit” link of the tag which shows the ID in the URL (which you can see at the bottom left of the screen).

Find Attachment ID

Click “Media.” 

Find and click on the attachment for which you want to know ID.

In the Address Bar, the number you see after “item=” is that attachment ID. In our case, it is 18.

Attachment ID

Find Comment ID

Go to “Comments.”

Find the comment for which you want to know ID. After that, click “Edit” link of that comment.

In the Address Bar, the number you see after “c=” is the ID of that comment. In our case, it is 1.

Comment ID

Alternative Method

Go to “Comments” and then hover the mouse over the “Edit” link of the comment for which you want to know ID.

Now, you can see the ID of the comment in the URL. The URL will be typically shown at the bottom left of the screen.

Find User ID

Go to the “Users.”

Click the Username you want.

In the Address Bar, the number you see after “user_id=” is the ID of the user. In our case, it is 2.

User ID

Alternatively, you can do the same task by going to “Users” and then hover the mouse over the “Edit” link of the Username which shows user ID in the URL (which you can see at the bottom left of the screen).

Note: You cannot see user ID of your profile using the above method. If you want to know your profile’s user ID, then follow the below steps:

Go to Users. Click the number under “Posts” column of your Username. Now, you can see all the posts written by you. In the Address Bar, you can see a number after “author=” which is the ID of your user profile.

Find Menu ID

Go to the Appearance > Menus.

Select the menu you want.

In the Address Bar, the number after the “menu=” is the ID of the menu. In our instance, it is 6.

Menu ID

Also see:

How to Find Database Name

How to Add HTML Sitemap to WordPress Blog


Scroll to Top