How To Find Your WordPress Page And Post IDs

Learn how to easily find a WordPress post or page ID and why knowing how to locate your post and page IDs can be useful.

How To Find Your WordPress Page And Post IDsDo you need to know how to exclude public access to certain posts or pages in areas of your website like your sitemap?

One of the easiest ways to do this is to filter your pages or posts by ID.

Your WordPress Page Or Post ID is a unique identifier assigned by WordPress to every post or page created on your site.

Knowing how to locate a page or post ID can be very useful if for example, you want to prevent pages from displaying in your WordPress sitemap, or if you want only certain pages to display in the sidebar.

In this tutorial, you will learn how to locate the WordPress page or post ID.

How To Locate The Post Or Page ID In Your WP Blog: Tutorial

To locate your page or post ID, log into your site and either go to the Pages section (to see the ID of a specific page) or the Posts section (if you want the ID of a specific post) …

WP Dashboard - WP Pages Menu - All Pages

(WP Dashboard – WordPress Pages Menu – All Pages)

Find the page or post that you want to know the ID of and hover your mouse over its title …

Hovering over the page title displays Post ID

(Hover over the post title to display Post ID)

The “post or page ID” value is displayed in the status bar of your web browser. In the image below, the page ID is 5575

Page ID displayed in your web browser

(Page ID)

Note down the ID of the post or page.

Practical Uses For Post ID/Page ID

Here are a few examples of using WordPress page or post IDs:

Exclude Posts Or Pages From Appearing In Your Site Map

In the example below, we want to exclude a page whose ID is “26” from displaying to visitors on a site map.

Most site map plugins contain fields that let you specify the IDs of excluded items (e.g. categories, pages, etc.) …

Excluding pages and posts from showing in a site map

(Exclude posts or pages from displaying in your site map)

Excluding Posts And Pages From Showing In Your WordPress Sidebar

Another practical use for unique page IDs is to exclude them from appearing in your sidebar.

Simply enter all of the WordPress Page IDs for the pages you want to exclude separated by a comma into the Exclude field of the Pages widget, and click the Save button …

Preventing posts or pages from appearing in the WordPress sidebar

(Excluding pages or posts from displaying in the WordPress sidebar)

Exclude Posts And Pages From Showing In Your Sitemap

You can also use page and post IDs to exclude posts or pages from your XML sitemap …

Exclude posts and pages from displaying in an XML sitemap|sidebar

(Prevent pages or posts from displaying in an XML sitemap|sidebar)

WP Plugins – Page/Post IDs

If you need to regularly access your page or post IDs, then here are a few FREE plugins you may find useful:

Reveal IDs

WordPress Plugin - Reveal IDs

(Reveal IDs WP Plugin)

This WordPress plugin displays IDs for posts, pages, categories, links, media, users, comments, link categories, custom post types, custom taxonomies and tags. It also adds a sortable column header to your Posts and Pages tables …

ID Column

(Posts Table – ID Column)

You can access the plugin settings by going to Settings > Reveal IDs

Settings - Reveal IDs

(Settings – Reveal IDs)

Learn more about this plugin here: 

99 Robots Show IDs

99 Robots Show IDs - WP Plugin

(99 Robots Show IDs WP Plugin)

99 Robots Show IDs is another useful WordPress plugin that lets users see their posts, pages, media, links, users, categories and tags in the Posts and Pages admin tables. It’s also a very lightweight plugin that supports custom post types  and taxonomies.

Download the plugin here:

ID ARRAYS

ID Arrays WP Plugin

(ID Arrays Plugin)

ID Arrays not only adds a column of IDs to your Table of Pages/Posts, it also provides a very useful function that lets you copy a list of selected Post/Page IDs to your clipboard.

ID Arrays allows you to select and copy a list of Post/Page IDs to your clipboard

(ID Arrays lets you select and copy a list of Post/Page IDs to your clipboard)

This can be very useful if, for example, you are working with a long list of pages where many IDs are required and finding each ID would be time-consuming.

Learn more about the plugin here:

Congratulations, now you know how to easily find the post or page ID in your WP website.

How To Find Your WordPress Page And Post IDs

***

"I have used the tutorials to teach all of my clients and it has probably never been so easy for everyone to learn WordPress ... Now I don't need to buy all these very expensive video courses that often don't deliver what they promise." - Stefan Wendt, Internet Marketing Success Group

Disclaimer: We are not directly associated with WordPress or any of the products mentioned or reviewed on this website. We may receive financial benefits from the purchase of third-party services and/or products advertised, endorsed or linked from this website. All images and details sourced from product websites are the copyright of their respective owners and have been used solely for training or illustrative purposes.

***

Did you enjoy this article? If so, please consider sharing this article with anyone thinking of starting or growing their business online using the social buttons below.

Author: Martin Aranovitch

Martin Aranovitch is the founder of WPCompendium.org and has authored hundreds of FREE WordPress tutorials for non-techies and beginners. WPCompendium.org provides detailed step-by-step tutorials that will teach you how to use WordPress with no coding skills required and grow your business online at minimal cost!