Ever wondered how to prevent specific pages or posts from appearing in areas of your site like your sitemap?
Often, the easiest way to do this is to filter your pages or posts by ID.
Your WordPress Post ID is a unique identifier assigned to every page or post you create.
Knowing your page or post ID is useful if for example, you want to exclude pages from showing in your sitemap, or if you want only certain pages to display in the sidebar section of your website or blog.
In this step-by-step tutorial, you are going to learn how to find your WordPress post or page ID.
How To Find The ID Of Any Post Or Page In A WP Website: Tutorial
To locate your page or post ID, log into your site’s admin and either go to the Pages screen (for IDs of pages) or the Posts area (if you need to find the ID of a post) …
(WP Dashboard – All Pages)
Find the page or post that you would like to know the ID of and hover your mouse over the title …
(Hover over the page title to display Page or Post ID)
The unique “ID” value is displayed in the status bar of your web browser. In the example below, the ID is 5575 …
Record the ID of the post or page.
Practical Applications For Page/Post ID
Here are a few practical ways to use WordPress page or post IDs:
Exclude Posts Or Pages From Appearing In A Site Map
In the example below, let’s say that you need to prevent a page whose ID is “26” from displaying to visitors on a site map.
Site map plugins typically include fields that let you specify the IDs of items you want to exclude (e.g. categories, pages, etc.) …
(Preventing pages and posts from displaying in your site map)
Exclude Posts Or Pages From Displaying In Your Sidebar
Another useful application for page IDs is to exclude them from appearing in your WordPress sidebar.
Just enter all of the 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 …
(Excluding posts or pages from appearing in the sidebar)
Preventing Posts And Pages From Displaying In Your XML Sitemap
You can also use post and page IDs to exclude pages or posts from your XML sitemap …
(Prevent pages and posts from appearing in your XML sitemap|sidebar)
Plugins – Page IDs
If you need to regularly access your post or page IDs, then here are a few FREE plugins that you may find useful:
(Reveal IDs 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 Pages and Posts tables …
(Posts Screen – ID Column)
You can access the plugin settings area by going to Settings > Reveal IDs …
(Settings – Reveal IDs)
Learn more about the plugin here:
(99 Robots Show IDs)
99 Robots Show IDs is another WordPress plugin that lets users see their posts, pages, links, media, users, categories and tags in the Posts and Pages admin tables. It’s also a super lightweight plugin that supports custom post types and taxonomies.
Download this plugin here:
(ID Arrays Plugin For WordPress)
ID Arrays not only adds a column of IDs to your Table of Posts/Pages, it also provides a very useful function that lets you copy a list of selected Page/Post IDs to your clipboard.
(ID Arrays allows you to 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 posts where many IDs are required and the process of finding each ID would be time-consuming.
To download this plugin, go here:
Congratulations, now you know how to easily locate post and page IDs in WordPress.
"Learning WordPress has been a huge stumbling block for me. I've been looking for something that covers absolutely everything but doesn't cost an arm and a leg. Thank you so much ... you have just provided me with what I have been looking for! Truly appreciated!" - Tanya