How to Find WordPress Page ID and Post ID?

How to Find WordPress Page ID and Post ID?

As a business site owner, you might come across a situation where you need to access the page or post ID for a specific post or page. It can either be to keep track of all the contents on your website or access specific content.

Well, in such case, if you do not know how to find WordPress page ID and post ID, you should read this article. 

Here is all that there is to know about finding IDs in WordPress. We’ll also talk about the different tools and techniques for your solution. Keep reading to find out more.

What is Page ID and Post ID in WordPress?

WordPress assigns each piece of content on your site with a unique identification number. Whether it’s a post, page, media, or comments, each content gets a unique ID that helps WordPress keep track of your site’s contents. 

Whenever you search for specific content, WordPress retrieves the content for you, using the unique ID. Besides, WordPress page or post IDs are useful while coding too. You can use it while adding code snippets to your site or working or theme, plugins, or widgets. You can make specific changes targeting specific IDs as well.

Thus, finding a WordPress page or post ID gives you much more control over your WordPress site. Now the question is how to find WordPress page ID and post ID.

How to Find a WordPress Page ID and Post ID?

It is easy. There are many ways to do so. You can do it manually, or use a plugin, or use PHP. We’ll discuss each of these methods below.

1. Manually

To manually find out the page ID or a post ID in WordPress, one needs to follow the steps below.

For page ID,

  • Go to WordPress Admin Dashboard and click on Pages > AllPages.
Click on all pages tab
  • Click on the page that you want to find the ID from the list.
  • Once you click on the page, you want to find the ID. Look at the URL address in your web browser’s address bar. There, you’ll find the page ID number within the URL.
How to find page id

Similarly, to find the post ID,

  • Go to WordPress Admin Dashboard and click on Posts > All posts.
Click on all posts tab
  • Click on the post you want to find the ID from the list.
  • Once you click on the post, look for the ID. Look at the URL address in your web browser’s address bar. There, you’ll find the post ID number within the URL.
How to find post id

2. Using Plugin

Rather than looking for IDs in URLs, you can use a plugin for finding WordPress pages or posts IDs. The plugin makes your job easier by doing all the work for you. They present you with the ID number without you having to go through any hassle. 

Here, we have three best plugins for finding WordPress pages or posts ID. 

Reveal IDs

Reveal IDs ranks on top as one of the best plugins for displaying IDs quickly and beautifully. It is a trusted name among WordPress users. With more than 70,000 installations, Reveal IDs assures you quality service and that too, with minimum use of resources.  

This plugin has the option to display all your content IDs in your admin menu. You can choose whether you want to show the ID or not. 

It supports multiple languages and is updated regularly. You can download it, install it, activate it, and that’s it. The plugin does the rest for you while you sit back and relax. 

Show IDs

Show IDs by 99 Robots is another excellent option for plugins to help you find WordPress page ID and post ID of any content on your website. It is lightweight and easy to use.

Activate the plugin once you install it, and that’s all. You do not need to configure any settings. Once you start the plugin, it adds an extra column on the admin page that displays all your contents’ IDs, including posts, pages, categories, etc.

The best thing about the Show IDs plugin is that it supports custom post types and custom taxonomies.

Catch IDs

Catch IDs from Catch Plugins is another excellent plugin for finding WordPress page ID, post ID, category ID, Tag ID, Media ID, Links ID, and User ID. This helps you retrieve your content easily whenever needed. 

For coders, knowing the IDs of the contents can be a great help. To use this plugin, install and activate it. Then, you’ll see a new column called ID with IDs for all contents. You can choose either to display it or not. 

With over 30,000 installations and frequent updates, this plugin indeed is the one you can trust.

3. Using PHP

If you don’t already know, too many plugins can slow down your website’s loading speed. You can use this alternative method to find IDs of posts or pages. 

Since WordPress uses PHP, this method allows you to use the PHP function called the_ID() function. It helps you retrieve IDs of any content on the website.

Here’s how you can use it: 

<p>Post Number: <?php the_ID(); ?></p>

Since the_ID() function is added within the loop, it will print the current ID.

How to Find a Category ID and Tag ID?

It is easy to find IDs of taxonomies like categories and tags. For this, you need to follow a similar process as finding a post ID or page ID.

Go to Posts > Categories or Posts > Tags, and Select the category or tag you want to identify. Click on the “Edit” button.

Check the URL at the web browser’s address bar. You’ll see a string that looks like this: 

tag_ID=NUMBER. That’s the category/ tag ID. 

How to find Category page ID

How to Find Media ID in WordPress?

When looking for a Media ID, an ID of an image or other media files, go to Media > Library in your WordPress admin dashboard.

Select the media file that you want to identify and click on it. You’ll see an “Attachment Details” screen pop up. Check the URL to get the ID of the media file. The ID appears as item=NUMBER.

How to find media ID

Conclusion

We hope you learned all different WordPress page ID and post ID methods, including other content IDs. You can use these methods to retrieve any content on your website with ease.

Choosing a plugin to get the job done or doing it manually on your own may depend on the purpose and preference. Please share your experience in the comments section below.

We also have an article on How to Duplicate WordPress Post or Page. If you want to read more valuable articles regarding WordPress, then you will find this article helpful.

About the Author

Nabin Jaiswal

Nabin Jaiswal is the co-founder of CoachPodium, WP Delicious, and other WordPress products. With over six years of experience in WordPress, he is passionate about writing and sharing his insights with the community. Nabin is committed to contributing to the community through knowledge-sharing and innovation. He has also had the privilege of being a speaker at multiple WordCamps, sharing his expertise and experiences.

View All Posts

Leave a Reply

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