Blogging Tips

Quick Blogging Tips: How to Find the Post ID in WordPress

Do you want to find the post id in WordPress? If you’re a blogger, then chances are at some point you’ve wanted to know what your post ID is. You might have been looking for it so that you could use it in a plugin or another piece of code, or maybe just because you were curious and wanted to check out how many comments your latest blog post had. Either way, this quick tip will show you where to look!

picture of computer with wordpress pulled up on screen

What Are WordPress Page and Post IDs?

Every piece of content on your WordPress site has an individual ID number. A post ID is the unique number assigned to those pieces of content on your WordPress site. This includes pages and posts, as well as media files, comments, categories, tags, users and more.  Unfortunately, it doesn’t typically display readily, so you’ll need to figure out a way to find it.

screenshot of list of posts in WordPress with post id circled in red

How to Find Your WordPress Post ID

If this is what you’re looking for then the quickest way to find it is by going to your dashboard and clicking Posts > All Posts from the menu bar at the top of your screen. Keep in mind that if you are using any plugins they may have added extra data into the table with their own IDs so you will want to modify where indicated here based on what information is available when viewing your posts.

If you hover over the name of the post you want to find the ID for and look in the lower left hand corner of your window you’ll see a URL that includes the post id. See the photo above for reference.

How to Find your WordPress Page ID

Finding your Page ID is similar but requires an additional step. You will want to navigate to Pages/All Pages and then choose Edit for the Page you would like to find the ID for. Then click in the URL bar above in order to see the preview URL for the page. Within that URL you will once again see the post ID for that particular page. See the photo above for reference.

Why It’s Helpful to find WordPress Post and Page IDs

Often times you need to use the ID for a plugin or other piece of code that needs an individual ID number. This can happen when you are setting up your home page to link to certain pages or when you are doing other customizations on your site.

Another Option

If your are unable to locate the page or post ID using the techniques above, another option is to use a free plugin call Reveal IDs. It will add an additional column to your pages and posts screen that will show you the IDs.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.