Ever wondered how to prevent certain pages or posts from appearing in areas of your website like your sitemap?
Often, the easiest way to do this is to filter your pages or posts by ID.
Your WordPress Page ID is a unique identifier assigned to every page or post created on your site.
Knowing how to locate a page or post ID can be really useful if for example, you want to exclude pages from displaying in your WordPress sitemap, or if you want only certain pages to show in the sidebar.
In this step-by-step tutorial, you are going to learn how to find the WP page or post ID.
How To Find WordPress Post And Page IDs: Tutorial
To find your page or post ID, log into your WordPress admin area and, depending on which ID you are trying to locate, either go to the Pages screen (if you need page IDs) or the Posts area (to see IDs of posts) …
(WP Dashboard – Pages Menu – All Pages)
Locate the page or post that you would like to know the ID of and hover your mouse over its title …
(Hovering over the title displays Page or Post ID)
The unique “page or post ID” value is displayed in the status bar of your web browser. In the image below, the ID is 5575 …
Write down the ID of the post or page.
WordPress Post Ids/Page IDs – Practical Uses
Here are a few practical uses for WordPress page or post IDs:
Excluding Posts Or Pages From Displaying In A Site Map
In the example below, let’s say that you need to exclude a page whose unique ID is “26” from displaying to visitors on a site map.
Many site map plugins have fields that let you specify the IDs of excluded items (e.g. categories, pages, etc.) …
(Exclude posts or pages from displaying in your site map)
Exclude Pages And Posts From Appearing In The Sidebar
Another practical use for unique page IDs is to exclude them from appearing in the sidebar section of your web site.
Just enter all of the WordPress Page IDs for the pages you want to exclude separated by a comma into the Exclude field of the WordPress Pages widget, and click the Save button …
(Prevent posts and pages from displaying in the WordPress sidebar)
Exclude Posts Or Pages From Appearing In A Sitemap
You can also use page and post IDs to exclude pages or posts from your XML sitemap …
(Preventing pages and posts from showing in your XML sitemap|sidebar)
Plugins – Page IDs
If you need to know your page or post IDs on a regular basis, then here are a few FREE plugins that you may find useful:
(Reveal IDs WordPress Plugin)
This WordPress plugin displays the IDs for pages, posts, links, categories, media, users, comments, link categories, custom taxonomies, custom post types and tags. It also adds a sortable column header to your Posts and Pages tables …
To access the plugin settings go to Settings > Reveal IDs …
(Settings – Reveal IDs)
Download this plugin here:
(99 Robots Show IDs – WordPress Plugin)
99 Robots Show IDs is a free plugin that displays your posts, pages, links, media, categories, tags and users in the Posts and Pages admin tables. It’s also a very lightweight plugin that supports custom post types and taxonomies.
Download this plugin here:
(ID Arrays Plugin)
This plugin not only displays a column of IDs in your Table of Pages/Posts, it also provides a 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 where many IDs are required and the process of finding each ID would be time-consuming.
Learn more about this plugin here:
Congratulations! Now you know how to easily locate your WordPress page or post ID.
"This is an awesome training series. I have a pretty good understanding of WordPress already, but this is helping me to move somewhere from intermediate to advanced user!" - Kim Lednum