When I first started using WordPress several years ago, I remember a plugin asking me for a post ID.
I thought I was picking up WordPress quite quickly, but this one had me stumped. I could see the name of my post, I could find the URL – but I had no idea how to find the post ID.
If you’ve ever had this problem, you’re in luck: today, I’m going to show you exactly where to find the WordPress post ID.
Now, many WordPress users don’t know how to find the post ID, and they get by just fine. So why might you need to know it? Usually, it’s a situation like the one above: because a plugin asks for it. But many themes will ask for post IDs during configuration, too.
Either way, it’s a good thing to know how to do.
How to Find a Post ID in WordPress
For me, the quickest and easiest way to find a post ID is done from the All Posts screen — found by logging into the WordPress dashboard and clicking Posts > All Posts.
From here, simply hover your mouse over the post you want to find the ID for. Now, take a look in the bottom left-hand corner of the screen.
See that pop-up box? That contains the post ID.
More specifically, the post ID is the number that comes after the “post=” and before the “&“.
See what I mean in the above screenshot? In this instance, my post ID is 6706.
You can also find the post ID in the WordPress editor, which you get to by clicking on the post you want.
When done this way, the post ID is in the address bar. The URL shown will be exactly the same, and the post ID is again sandwiched between the “post=” and the “&.”
Both ways are really easy to do, and it shouldn’t take more than a few seconds to find the post ID.
Page, Category, Tag, Comment, and User IDs
But it’s not just posts that are assigned a custom ID number that’s difficult to find.
Every page, category, tag, comment, and user ID on your website will also have a unique ID number.
You can find these ID numbers in exactly the same way that you found the Post ID numbers. In the case of category ID, simply click Posts > Categories from within the WordPress dashboard.
When there, find and hover over the category you want, and you’ll see the URL you want in the bottom left corner, same as before.
The category ID is found after “category&tag_ID=” and before “&” as seen in the screen grab above.
Alternatively, you could click on the category and find the category ID from the URL.
I’ve highlighted it for you in the address bar above.
Final Thoughts
If you’re struggling to configure a theme or use a plugin because you can’t find a post ID, I hope this short tutorial has helped you out.
Although it’s really easy to do, most WordPress users won’t know how to find the post ID, simply because it’s so rarely needed. Remember how it’s done, so if you are ever asked for it, you won’t waste any time finding it.
Do you have any questions about finding WordPress Post IDs? Fire away in the comments section below!
We can help with flexible Managed WordPress Hosting.
Emina
Nice post, very useful not only to newbies but also for pros and plugin developers who regularly need to use the post id function call in the code.
Miguel
Man, such a helpful post. I checked everywhere in the dashboard trying to find the ID but I couldn’t – it took 30 seconds after finding your post.
Thanks
Kelsey
Thank. You. Seriously! Ive been using WordPress for so long, I’ve even learned to do a little development, but this too has stumped me. Very appreciated.
Shriram
Thanks a lot! you saved my day. I was filtering my post in my theme, but it kept asking for postID to remove some posts from one block. I have used wordpress for a while, but never knew that someday I would need postID! Thanks again.
Jessica Wait
Thank you so much for this!!!
Crystal
Thanks Shaun! Very helpful
Max
My Start/Home page is not listed on “pages”. How can I find out its number ID?
Renee Christine
Thank you so much, this helped me get my site done quicker!
Ugyen Norbu
Simple and succinct post. I appreciate your approach to explaining what matters the most within a short post instead of beating around the bush like many post out there.
Thank you.
iwillteachucrypto
Thank you very much Shaun, helped me out…
YYDevelopment
Thanks for this great tutorial.
When you check the posts and pages IDs in high frequency, it takes too long to go for each page to check for the post id.
It can be done easily with a plugin. For anyone interested, “Show Pages IDs” is a plugin that i have developed and it will allow you to view the post and pages IDs on the top admin menu bar and on the back-end of the website.
https://wordpress.org/plugins/show-posts-and-pages-id/
Maude
Exactly what I needed, thanks!
Steve Jones
Lifesaving information, thank you
Rachel Watts
Thank you! This is super helpful. Solved my problem immediately.
🙂
Steven
This is the most helpful tip I have come across all day. As a beginner wordpress user, I’m constantly trying to find useful tips and this is a great workflow tip. Thank you very much.