Do you need to know how to prevent certain posts and pages from showing 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 post or page you create.
Knowing your page or post ID can be very useful if, for example, you want to exclude pages from displaying in your sitemap, or if you want only certain pages to show in the sidebar.
In this step-by-step tutorial, you will learn how to easily locate post and page IDs in a WordPress site.
How To Find The ID Of Any WordPress Post Or Page: Tutorial
To locate the unique ID of a page or post, log into your WordPress admin area and, depending on which ID you are trying to locate, either go to the Pages section (to find page IDs) or the Posts screen (to find post IDs) …
(WP Dashboard – WP Pages Menu – All Pages)
Find the page or post that you want to know the ID of and hover your mouse over its title …
(Hover over the title to view Page or Post ID)
The unique “post ID” value is displayed in the status bar of your browser window. In the image below, the page ID is 5575 …
(Page ID displayed in your browser)
Record the ID of the page or post.
Post ID/Page ID – When To Use
Here are a few practical uses for post and page IDs:
Exclude Posts Or Pages From Displaying In Your Site Map
Suppose we want to exclude a page whose unique ID is “26” from displaying to visitors on a site map.
Most site map plugins contain fields that let you specify the IDs of items you want to exclude (e.g. categories, pages, etc.) …
(Preventing pages and posts from appearing in a site map)
Exclude Posts Or Pages From Displaying In Your Sidebar
Another great use for unique page IDs is to exclude them from showing in the sidebar section of your website or blog.
To do this, simply enter all of the WordPress Page IDs for the pages you want to exclude separated by commas into the Exclude field of the WordPress Pages widget, and click the Save button …
(Exclude pages and posts from displaying in the WordPress sidebar)
Preventing Posts Or Pages From Showing In An XML Sitemap
You can also use post and page IDs to exclude pages or posts from your XML sitemap …
(Preventing pages or posts from showing in your XML sitemap|sidebar)
WP Plugins – Page/Post IDs
If you would like to see all of your page or post IDs inside your admin area when you log in, then here are some plugins that you may find useful:
(Reveal IDs Plugin For WordPress)
This WordPress plugin displays IDs for posts, pages, links, categories, users, media, comments, link categories, custom taxonomies, custom post types and tags. It also adds a sortable column header to your Pages and Posts tables …
(Posts Area – ID Column)
You can access the plugin settings by going to Settings > Reveal IDs …
(WP Dashboard – Settings – Reveal IDs)
For more information about this plugin, go here:
(99 Robots Show IDs WP Plugin)
99 Robots Show IDs is a free plugin that displays your 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.
Download this plugin here:
(ID Arrays Plugin)
This plugin 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 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 the process of finding each ID would be time-consuming.
To download this plugin, go here:
Congratulations, now you know how to easily locate the ID of a WordPress post or page.
"These tutorials have so much information and are easy to understand. If you use WordPress or plan to in the future these will help you with everything you need to know." - Valisa (Mesa, Arizona)