How to Find the Post ID in WordPress

Introduction to WordPress IDs

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.

Why WordPress IDs Matter

Why do these IDs matter, you ask? Well, they’re essentially the backbone of how WordPress organizes content. Each piece of content, be it a post, page, or comment, is stored in the WordPress database with its unique ID. This ID is how WordPress distinguishes between different pieces of content, even if they have similar titles or content.

Finding the Elusive Post ID

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 selecting 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 “&“.

Post ID

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 “&.”

Post ID URL

Both ways are really easy to do, and it shouldn’t take more than a few seconds to find the post ID.

Understanding IDs Beyond Posts

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.

Page, Category, Tag, Comment, and User IDs

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 select 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.

Category ID

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.

Category ID URL

I’ve highlighted it for you in the address bar above.

Final Thoughts

If you’ve been 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. Understanding and utilizing these IDs can significantly enhance your ability to manage and customize your site, making your WordPress journey smoother and more efficient. 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.

New Posts in your inbox

  1. 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.

  2. 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

  3. 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.

  4. 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.

  5. 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.

  6. 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/