Do you need to know how to exclude public access to certain posts or pages in areas of your website like your sitemap?
One of the easiest ways to do this is to filter your pages or posts by ID.
Your WordPress Page Or Post ID is a unique identifier assigned by WordPress to every post or page created on your site.
Knowing how to locate a page or post ID can be very useful if for example, you want to prevent pages from displaying in your WordPress sitemap, or if you want only certain pages to display in the sidebar.
In this tutorial, you will learn how to locate the WordPress page or post ID.
- How To Locate The Post Or Page ID In Your WP Blog: Tutorial
- Practical Uses For Post ID/Page ID
- WP Plugins – Page/Post IDs
How To Locate The Post Or Page ID In Your WP Blog: Tutorial
To locate your page or post ID, log into your site and either go to the Pages section (to see the ID of a specific page) or the Posts section (if you want the ID of a specific post) …
(WP Dashboard – WordPress 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 post title to display Post ID)
The “post or page ID” value is displayed in the status bar of your web browser. In the image below, the page ID is 5575 …
Note down the ID of the post or page.
Practical Uses For Post ID/Page ID
Here are a few examples of using WordPress page or post IDs:
Exclude Posts Or Pages From Appearing In Your Site Map
In the example below, we want to exclude a page whose ID is “26” from displaying to visitors on a site map.
Most site map plugins contain 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)
Excluding Posts And Pages From Showing In Your WordPress Sidebar
Another practical use for unique page IDs is to exclude them from appearing in your sidebar.
Simply enter all of the WordPress 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 pages or posts from displaying in the WordPress sidebar)
Exclude Posts And Pages From Showing In Your Sitemap
You can also use page and post IDs to exclude posts or pages from your XML sitemap …
(Prevent pages or posts from displaying in an XML sitemap|sidebar)
WP Plugins – Page/Post 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 WP Plugin)
This WordPress plugin displays IDs for posts, pages, categories, links, media, users, comments, link categories, custom post types, custom taxonomies and tags. It also adds a sortable column header to your Posts and Pages tables …
(Posts Table – ID Column)
You can access the plugin settings by going to Settings > Reveal IDs …
(Settings – Reveal IDs)
Learn more about this plugin here:
(99 Robots Show IDs WP Plugin)
99 Robots Show IDs is another useful WordPress plugin that lets users see their posts, pages, media, links, users, categories and tags in the Posts and Pages admin tables. It’s also a very lightweight plugin that supports custom post types and taxonomies.
Download the plugin here:
(ID Arrays Plugin)
ID Arrays not only adds a column of IDs to 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 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 finding each ID would be time-consuming.
Learn more about the plugin here:
Congratulations, now you know how to easily find the post or page ID in your WP website.
"I have used the tutorials to teach all of my clients and it has probably never been so easy for everyone to learn WordPress ... Now I don't need to buy all these very expensive video courses that often don't deliver what they promise." - Stefan Wendt, Internet Marketing Success Group
Disclaimer: We are not directly associated with WordPress or any of the products mentioned or reviewed on this website. We may receive financial benefits from the purchase of third-party services and/or products advertised, endorsed or linked from this website. All images and details sourced from product websites are the copyright of their respective owners and have been used solely for training or illustrative purposes.
Did you enjoy this article? If so, please consider sharing this article with anyone thinking of starting or growing their business online using the social buttons below.