How to Get Post ID in WordPress

Are you using WordPress Content Management System (CMS)?

If yes, then you might appreciate the fact that this CMS is highly user-friendly. Working with WordPress, you easily can manage all your blog posts. That’s precisely the reason why more and more Bloggers and Webmasters prefer to work with WordPress.

It is one of the best CMS in the world and thousands of bloggers are happy with this platform and easily manage their blog posts. However, this does not mean that WordPress does not involve a learning curve. There are several things in WordPress, which you need to know in order to get mastery over its usage. One such thing in WordPress is Post ID. Here I will let you know How to Get Post ID in WordPress.

If you have not changed Permalink Settings in WordPress, your post URL will give you Post ID. If you have changed Permalink Settings to SEO friendly URL, you can find little difficulty to know Post ID, Category ID and other ID like Page ID, Tag ID, etc.

So, if you have trouble finding the Post ID, this post is just meant for you. There are plugins which ask you to enter Post ID. If you have encountered such a situation, then you surely will appreciate this post. There are also themes which require you to enter Post ID during configuration. Thus, it is better to know to how to get Post ID in WordPress.

Steps to Know Post ID

Now, there are various ways to get Post ID. However, the easiest and quickest way is from the “All Posts” screen. To get to the “All Posts” screen, you have to first logging to the WordPress Dashboard screen. There you will find Posts option, then you have to move to the Posts > All Posts screen. Then you to hover your mouse to the post whose ID you want to know.

When you have done this, you have to look at the bottom left hand of the screen. Here you have to notice a Pop-Up Box. It is exactly where the Post ID is located. Specifically speaking, Post ID is the number which comes after the “post=” and before the “&” option. Here, I have attached a screenshot for your reference. As you can see the post ID is 2546.

WordPress Post ID
Apart from the above-listed way, there is another method of knowing the Post ID. In this method, you have to click on the post whose id you want to know. This is done through the WordPress Editor.

When you have selected the post and WordPress Editor is open, the Post id is visible in the address bar. Here you will see the URL in the address bar and post ID is visible which is between “post=” and “&”. Here I have attached a screen shot to let you know how exactly the Post id is known. Here, look at the address bar and post id, in this case, is 2546.

Post ID in URL
So you can now judge that both the ways are really easy to get Post Id in WordPress. It will not take more than a minute to know what is the post id for your chosen post. Unique ID Number is also assigned to a page, category, tag, User Id, Comment. For example, Category ID is located through the Posts>Categories from the WordPress Dashboard. Here it will be visible when you hover to the Category you want. It is visible in the bottom left-hand corner of the Screen after “Category&tag_ID=” and before “&”. Here I have attached a screenshot for your reference.

WordPress Category ID

Apart from this method, you can click on the category in the WordPress Editor and the URL demonstrates the Category ID. It can be seen from the screenshot which I have attached for your reference.

WP Category ID in URL

So through the above tutorial, you get to know Post ID and category ID easily and quickly. When you are struggling to configure a theme or plugin, this tutorial can be of great help to you. You just need to remember it. That’s it!

Scroll to Top