One of the easiest ways to do this is to filter your pages or posts by their unique ID.
Your WordPress Post Or Page ID is a unique number assigned to every page or post you create.
Knowing your page or post ID is really useful if for example, you want to prevent pages from displaying in your sitemap, or if you want only certain pages to display in your WordPress sidebar.
In this tutorial, you are going to learn how to find your WordPress post or page ID.
How To Locate The Post Or Page ID In A WordPress Website: Step-By-Step Tutorial
To find the ID of a page or post, log into your site and, depending on which ID you are trying to locate, either go to the Pages section (if you need to find the ID of a page) or the Posts area (for the ID of a particular post) …
(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 the title …
(Hovering over the page title reveals Page or Post ID)
The “page or post ID” value is displayed in the status bar of your browser window. In the screenshot below, the post or page ID is 5575 …
Record the ID of the post or page.
Practical Uses For Page ID/Post ID
Here are some practical applications for post and page IDs:
Preventing Posts And Pages From Showing In Your Site Map
Let’s say we would like to exclude a page whose unique ID is “26” from displaying to visitors on a site map.
Most site map plugins include fields that let you specify the IDs of items you want to exclude (e.g. categories, pages, etc.) …
(Prevent posts and pages from displaying in a site map)
Preventing Posts And Pages From Showing In Your WordPress Sidebar
Another practical use for unique page IDs is to exclude them from displaying in the Pages Widget.
Just enter all of the Page IDs for the pages you want to exclude separated by commas into the Exclude field of the Pages widget, then click the Save button …
(Exclude posts or pages from appearing in your sidebar)
Excluding Pages And Posts From Showing In An XML Sitemap
You can also use page and post IDs to exclude posts or pages from your XML sitemap …
(Preventing posts or pages from appearing in your XML sitemap|sidebar)
WordPress Plugins – Page IDs
If you want to regularly access the IDs of all your pages or posts, then here are some WordPress plugins you may find useful:
(Reveal IDs – WordPress Plugin)
This free plugin reveals IDs for posts, pages, categories, links, 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 Screen – ID Column)
You can access the plugin settings area by going to Settings > Reveal IDs …
(WP Dashboard – Settings – Reveal IDs)
To download this plugin, go here:
(99 Robots Show IDs WP Plugin)
99 Robots Show IDs is a free WordPress plugin that displays your posts, pages, media, links, users, categories and tags 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:
This plugin not only adds a column of IDs to your Table of Posts/Pages, 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 with many IDs required and finding IDs one by one would be time-consuming.
Learn more about this plugin here:
Congratulations! Now you know how to easily locate page and post IDs in WordPress.
"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