Do you need to know how to exclude public viewing of specific posts and pages in areas of your site like your sitemap?
Often, the easiest way to do this is to filter your pages or posts by their unique ID.
Your WordPress Page Or Post ID is a unique number assigned by WordPress automatically to every page or post you create on your site.
Knowing your post or page ID can be quite useful if, for example, you want to prevent pages from showing in your WordPress sitemap, or if you want only selected pages to show in the Pages Widget.
In this tutorial, you are going to learn how to easily find WordPress post and page IDs.
How To Locate The Unique ID Of Any Page Or Post In Your WordPress Blog: Tutorial
To locate your page or post ID, log into your site and either go to the Pages section (if you need to find IDs of pages) or the Posts area (to find post IDs) …
(WP Dashboard – All Pages)
Find the page or post that you want to know the ID of and hover your mouse over the title …
(Hovering over the post title displays Page or Post ID)
The “ID” value is displayed in the status bar of your browser window. In the image below, the page or post ID is 5575 …
(Page ID displayed in your browser)
Record the ID of the post or page.
Practical Uses For Post/Page ID
Here are a few practical applications for page and post IDs:
Prevent Posts And Pages From Displaying In A Site Map
Suppose we need to prevent a page whose ID is “26” from displaying to visitors on a site map.
Most site map plugins have fields that let you specify the IDs of excluded items (e.g. categories, pages, etc.) …
(Preventing posts or pages from appearing in your site map)
Preventing Posts And Pages From Displaying In The WordPress Sidebar
Another practical use for page IDs is to prevent them from appearing in your sidebar.
Simply enter all of the Page IDs for the pages you want to exclude separated by commas into the Exclude field of the Pages widget, and click the Save button …
(Prevent posts or pages from appearing in your WordPress sidebar)
Prevent Pages And Posts From Displaying In An XML Sitemap
You can also use page and post IDs to exclude pages or posts from your site’s XML sitemap …
(Prevent pages and posts from displaying in the XML sitemap|sidebar)
Plugins – Page 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 Plugin For WordPress)
This free plugin reveals the IDs for posts, pages, links, categories, media, users, link categories, comments, custom taxonomies, custom post types and tags. It also adds a sortable column header to your Pages and Posts tables …
To access the plugin settings go to Settings > Reveal IDs …
(Settings – Reveal IDs)
To download this plugin, go here:
(99 Robots Show IDs – WordPress Plugin)
99 Robots Show IDs is another WordPress plugin that lets users view their pages, posts, links, media, tags, users and categories in the Pages and Posts admin tables. It’s also a super lightweight plugin that supports custom post types and taxonomies.
To download this plugin, go here:
(ID Arrays – WordPress Plugin)
ID Arrays not only displays a column of IDs in 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 lets you select and copy a list of Page/Post IDs to your clipboard)
This can be very useful if, for example, you are working with a long list of pages with many IDs required and finding each ID would be time-consuming.
Learn more about the plugin here:
Congratulations, now you know how to find WordPress post and page IDs.
"I am beyond impressed with what you have put together. I can tell that you put a ton of hard work into building what you have. You have the absolute best content on WordPress I have ever seen!" - Robert T. Jillie