How to Find WordPress Page ID, Post ID & Other IDs [Quick Tutorial]
Are you looking for a way to find the WordPress page ID, post ID, or image ID? Your search ends here.
Every page, post, image, category, and even comments on your WordPress site has a unique ID. And sometimes, you need these IDs for a specific purpose:
- To hide a page with the help of a plugin
- Customize a particular post or page
- Hide a widget on specific posts or pages
- Some themes or plugins may ask for the page/post ID to perform a task
That is why I’ve come up with this article where I’ll show you the step by step process on how to find the page ID, post ID, and other IDs in WordPress.
Let’s dive in.
Contents
How to Find WordPress Page ID (Quickly)
As mentioned earlier, WordPress assigns a unique ID to every page on your website. And you can find the ID of any page without the help of a plugin.
Here’s the step by step process to find the WordPress page ID:
Step 1: Go to Pages -> All Pages from the left sidebar of your admin panel. This will redirect you to a page having all the “Pages” on your website.
Step 2: Hover your mouse cursor over the title of the page whose ID is required.
Step 3: You’ll now find a URL at the bottom of your screen. That URL will have a number – that number is the page ID.
Precisely, the page ID can be found after “post=” in that URL. Hence, the Page ID in the above example is 87.
You can also find the page ID if you’re on the page editor. Just check the address bar of your web browser to get the WordPress page ID.
Again, the page ID can be seen after “post=”. And the ID can be a single-digit or multiple digits number
You can continue the same process for finding the IDs of all the pages you want. In case you find this process tiring, you can use a plugin to get the page IDs quickly.
How to Find the Post ID in WordPress
Just like pages, you can also find the ID of any post in WordPress. And you’ll have to follow the same method as you did for pages.
Let me quickly show you how to get the post ID in WordPress.
First, you need to go to Posts -> All Posts from the left sidebar to see your existing posts. Next, you’ll have to hover your cursor over the title of the post.
Now check the URL at the bottom of your screen to get the post ID. It is the number present after “post=” in that URL.
As you can see, the post ID in the above example is 1177.
You can also find the post ID when you’re editing a post. In such cases, you can check the address bar of your browser to get the ID of that post.
How to Find the Image ID in WordPress
Some WordPress themes or plugins may ask for the ID of an image. For example, the Twenty20 Image Before After plugin needs the image IDs to display the before and after image slider.
Don’t worry, you can easily get the ID of any image you like.
First, head over to Media -> Library from the left sidebar of your admin panel. Here you should click on the image you want to find the ID for.
Now check the address bar of your web browser – you’ll find the ID of the image after “item=“. In my case, the image id is 1687.
Find Category ID and Tag ID
Categories and tags are used to group posts based on some criteria. And you can easily find the ID of a category or tag in WordPress.
To get the category ID, you need to go to Posts -> Categories from the left sidebar. On the Categories page, you should hover your mouse cursor over the category name to get the ID.
You can also click on the category name and then find the ID in the address bar of your web browser. In both cases, the ID will be sandwiched between “category&tag_ID=” and “&post_type“.
In the above example, the ID of the category “Test” is 19.
Just like categories, you can get the tag ID by going to the Posts -> Tags page and then, hover your cursor over the tag to see the ID at the bottom of the screen.
As you may have already guessed, the tag ID can be found after “post_tag&tag_ID=“. The ID of the “seo” tag in the above screenshot is 210.
Find the ID of a User
Want to get the ID of a user on your WordPress site? Just like pages, categories, and other items, you can easily find the ID of any user you want.
First, head over to Users -> All Users page to see all the users registered on your WordPress site.
Here you should take your cursor over the name of the user and then check URL at the bottom of your computer screen.
You’ll find the ID of that user after “user_id=” in the URL. In the above example, the user ID of “john” is 3.
However, the above method will not work if you want to find your own ID. You can use another way to find the user ID in that situation.
All you need to do is hover the cursor over the number of posts written by you. And then check the URL at the bottom of your screen.
This time you’ll find the ID after “author =“. And in my case, the user ID is 1.
But you should note one thing here – this method will work only if the user has written at least one post on that site.
Find the ID of a Comment
Finally, it’s time to show you how to find the ID of a comment in WordPress.
First, you should click on Comments from the left sidebar. On the Comments page, you’ll have to take your mouse cursor over the comment whose ID is required. You’ll now see some links below that comment.
Just take your cursor to the Edit link, but don’t click on it. Now check the URL at the bottom of your screen. The comment ID is the number at the end of the URL and can be found after “c=“.
In the above example, the ID of the comment is 31.
You can also click on the Edit link of that comment and then check the address bar of your browser to find the comment ID.
Find Page/Post IDs in Bulk (Using a Plugin)
What if you want to find the IDs of more than 10 posts/pages quickly? In such cases, you can use a plugin to get the IDs in bulk.
Reveal IDs is one of the best plugins you can use to find the post or page IDs quickly. It has over 70,000 active installations and can be used to get the tag, category, or image IDs as well.
Let me show you how this plugin works.
First, you need to go to Plugins -> Add New and then search for “Reveal IDs” in the search bar. And you should install and activate the plugin once you find it.
Now head over to Pages -> All Pages from the left sidebar. Here you’ll find a new column ID, added by the Reveal IDs plugin, showing the IDs of all your pages.
In case you don’t see the new column, you need to click on Screen Options, present at the top-right corner, and then tick the ID checkbox.
Finally, you should click on Apply to save the changes.
This will add the ID column to the “Page” table. Simple, isn’t it?
[wphr_box_blue]Note: You can follow the same process to get the IDs of posts, images, categories, tags, users, and comments in bulk.[/wphr_box_blue]
Final Thoughts
I hope this article helped you to learn how to find WordPress page ID on your website. I’ve also explained how you can get the ID of a post, category, tag, comment, image, and user.
You can even use the Reveal IDs plugin to find the page or post IDs in bulk.
If you face any problem, please feel free to ask me in the comment section. Also, don’t forget to share this article on Facebook and Twitter. Remember – sharing is caring 🙂
What next? You can read these recommended articles now: