How can I find a WordPress page ID?

WordPress is a pretty popular CMS that you can use to create and publish thousands of posts. How does WordPress uniquely identify all these posts? It does this with the help of ID.

All pages and posts you create in WordPress will have their own unique ID. However, IDs aren’t limited to posts and pages. Each content on WordPress gets its own ID. This includes metadata such as categories and tags, as well as any uploaded images.

In this post, I’ll show you how to quickly find out the ID of any WordPress post or page.

Find the ID of any WordPress post

First, we’ll go to a list of all the posts on our website by navigating to Messages> All messages from the WordPress admin dashboard. As you can see, this will show you a list of all private and public posts on the website, as long as you are logged in as an editor or administrator.

WordPress post listWordPress post list

You can then click on the post title or the Edit button that appears when you hover over the post entry. This will take you to a new webpage where the URL structure will look like this:

You noticed the word to send in the URL above? This is a query string parameter. The value of to send is the ID of the post you clicked on. In my case, the post ID titled “My Recent Trip” is 66.

Find the ID of any WordPress Page

You can find the ID of any WordPress page the same way you found the post ID. First, you need to go to Pages> All Pages from the WordPress admin dashboard.

WordPress page listWordPress page listWordPress page list

Now you can click on the page title or on Change to go to the Edit Page screen. At this point, the URL in the browser should look like this:

Again, you can see that there is a query string parameter called to send in the URL. The parameter name remains to send even if you are editing pages. The value of the post parameter in this case is 7. This means that the ID of the “Cart” page is also 7.

Quickly find the ID of multiple posts or pages

Let’s say you are looking for the ID of 10 different posts or pages. In this case, there is no point in opening them all in the browser and checking the ID. You don’t actually need to click on all of these links. Hover your mouse over them and almost all browsers will see the URL these links point to in the lower left corner.

Another solution to this problem is the use of plugins. You can search for any Post ID page or plugin in the WordPress plugin directory. Two plugins that I have found useful are the Show Pages IDs plugin and the Catch IDs plugin. Both will show you the ID of all pages, posts, comments, media, categories and tags in the admin area.

Here is a screenshot of the Pages> All Pages screen after installing the Show Page ID plug-in.

ID of WordPress posts and pages with pluginsID of WordPress posts and pages with pluginsID of WordPress posts and pages with plugins

Final thoughts

In this quick tip, we learned how to find out the ID of different WordPress posts and pages easily. You can simply hover over the post or page titles and check their value page query parameter if you only want the ID of a few pages. However, installing a plugin will save you more time in the long run if you have to find the ID of different pages frequently.

Source link

By LocalBizWebsiteDesign

Leave a Reply

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