How to Find the Post ID in WordPress

How to Find the Post ID in WordPress


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

Post ID

See what I mean in the above screenshot? In this instance, my post ID is 6706.

You can also find a post ID by clicking on the post you want, to open up the WordPress editor.

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 should take no 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. 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.

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.

While we have you...
Learn More

Did you know Pagely has a number of managed solutions to help big brands scale WordPress?

Category ID 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!

Looking for reliable WordPress hosting? Click Here

Subscribe for an easy once monthly email of updates.

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

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

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

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

    Shriram

Leave a Reply

Your email address will not be published. Required fields are marked *

How can we help?

Contact our sales team today for WordPress hosting solutions.

Request Your Quote
Categories