You need to know the numeric ID for every element while working on a demanding website project. Do you know how to find Page ID in WordPress? If not, then allow us to clear out the confusion for you.
Working with plugins, themes, and other tasks require you to enter Page ID multiple times. You need faster and easier access to the numeric IDs of each web component.
WordPress shows this information in its dashboard but won’t guide you properly on how to view it.
That is why we provide a detailed guide to how to find Page ID and other web components in WordPress. We show you multiple methods of accessing this number so you won’t have to limit your option.
Table of Contents
What is a Page ID in WordPress?
WordPress has a foolproof method of designating each of the content of the website with a numbering system. It provides a unique ID for pages, posts, media files, comments, categories, tags, etc.
Similarly, page ID refers to the specific identity provided to a webpage. You need this information while editing your website, themes, plugins, and others using programming languages.
While customizing your website, you may want to exclude a particular page or post from a specific function. With page ID, you can command WordPress to apply the setting for pages except for the selected ones.
For instance, you installed a social sharing plugin but didn’t want to display the Gallery page’s icons. WordPress identifies the Gallery with its unique Page ID. So, you can control the exact specifications of your website using this feature.
How to Find a Page ID in WordPress?
Now you know the meaning of Page ID in WordPress, right? It’s time to learn the steps to find this unique number in WordPress. There are multiple methods to find Page ID, but we’re discussing the simplest in this section.
With this quick process, you don’t need third-party plugins or edit codes on PHP.
First, you have to log in to the WordPress dashboard. You can find a “Pages” button on the interface’s left side, as shown in the screenshot.
Click on it, and you’ll see the list of all webpages on your site. Please select a page among them and click on its title. You can also click on the “Edit” button situated below the title, which takes you to the editing interface.
Now observe the site URL at the address bar. You will see a text POST=(number) after the question mark (?) symbol. The amount shown in the URL is the Page ID for that specific webpage.
The below screenshot shows that the Page ID of this particular page is 22.
The steps are identical for finding Post ID as well.
After you enter the WordPress dashboard, you need to click at the “Posts” button instead of “Pages.” Then, you select a post and enter its page to check its URL.
The number you see after the “POST=” text is the Post ID for that website post. The numeric ID of this post is 11, as shown above.
How to Find WordPress Category, Media, and Tag IDs?
The above steps of finding a unique ID also apply to other elements of your website. Some of them include media, category, and tags. We will explain how you can view the ID for these website components in this section.
The process is almost the same as the previous one. You have to log in to your WordPress dashboard and hover your mouse pointer to the “Posts.”
A drop-down menu pops out that includes Categories, Tags, and more. Click at the Categories button. You enter a page with all website categories. When you hover the mouse at one of the titles, more buttons appear below it.
Click at the “Edit” button, and you get to an editing interface for that category. Look at the URL of this page. The number you see after the text “categories&tag_ID=” is the Category ID.
The process is the same for Tag ID. You just have to click at the Tags button at the drop-down menu of “Posts” in the WordPress dashboard. Then click at your desired tags and see the number written after the text “tag_ID=” in its URL.
Additionally, you can find the ID number for media content using similar steps. Go back to the WordPress dashboard and look at the right side for the “Media” button. Click it and enter the Media Library.
Select any one of the media files of which you want to view the ID number. Click at that item, and you will see a pop-out window with the attachment details. Look at the URL of this item, especially the last section.
You can see the text “item=(number)” after the question mark (?) symbol. The “number” in the last section of this URL is the Media ID for your selected item.
How to View Page ID in WordPress With Plugin/Extension?
There is another measure for viewing the WordPress Page IDs. All previous sections’ methods involve going inside the details of each page, posts, media, and other content.
However, if you want to find the ID number for multiple items at once, you have to install a plugin. Reveal IDs is a free WordPress extension that works perfect for this situation.
You can view the ID number of all content like pages, posts, media, categories, and tags at the content menus. The installation procedure is quite simple.
Go to the WordPress dashboard and hover your mouse at the “Plugins” button. You’ll see three options at a drop-down menu. Click at the second option that says, “Add New.”
Inside the Add Plugin interface, there is a search bar for entering your keyword for the related plugin. Type Reveal ID and select the option that has the owner’s name of Oliver Schlobe.
Click at the “Install Now” button and wait until it shows the “Activate” text. Again click at the same button for activating this plugin. Your website now includes the Reveal ID plugin.
Go back to the Page interface by clicking at the “Pages” button on the left side. You can see the ID number for all the pages on the right side of the table.
Reveal ID plugin displays the unique ID for all website elements. If you want to check the Tag ID, click on the “Tags” button at the dashboard’s drop-down menu. The right side of the table shows the Tag ID for all the items.
If you don’t want WordPress to display this unique number for all content types, you can do so.
For instance, if you don’t want to see Comment ID, go to its interface by clicking at the “Comments” button. Click at the “Screen Options” button at the top-right corner. Uncheck the “ID” icon and click “Apply.”
Now you won’t see the Comments ID. You can quickly revert the settings by going inside the Screen Options.
Viewing WordPress Page ID Using PHP Code
Another way to know the page ID in WordPress is to use a PHP code. This method works best if you want to view the number at the front-end. The working mechanism of this process involves the “the_ID()” function.
You simply have to include this function at the code that relates to numeric ID. The example of this code is:
<p>Post Number: <?php the_ID(); ?></p>
We hope that you’ve gained a great deal of understanding from our post. Now the confusion of finding a numeric ID for specific pages, media, posts, or other elements won’t delay your website editing process.
Once you identify the page ID of the post/page, it becomes easier for you to make copies of it. If that’s the case, check out the article that helps you duplicate a page or post in WordPress.
Which of the above techniques did you find easiest for determining a page ID in WordPress? Kindly mention your preference in the comment section below.
Do you want our personal opinion? We recommend installing the Reveal ID plugin to observe the numeric ID for multiple elements at a single menu.
If you have any feedback or suggestions, do not hesitate to share with us in the comment section.