Do you need to know how to exclude specific posts or pages from displaying in areas of your site 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 to every post or page you create on your site.
Knowing how to locate the page or post ID is useful if for example, you want to exclude pages from showing in your sitemap, or if you want only selected pages to show in the sidebar section of your website or blog.
In this step-by-step tutorial, you will learn how to easily locate post and page IDs in a WordPress blog.
- How To Find A Post Or Page ID In A WordPress Website: Step-By-Step Tutorial
- Post IDs/Page IDs – Examples Of Uses
- WP Plugins – Page IDs
How To Find A Post Or Page ID In A WordPress Website: Step-By-Step Tutorial
To locate your page or post ID, log into your site’s admin and either go to the Pages area (if you want IDs of pages) or the Posts section (to find IDs of posts) …
(WP Dashboard – Pages Menu)
Locate the page or post that you would like to know the ID of and hover your mouse over its title …
(Hovering over the post title displays Page or Post ID)
The “ID” value is displayed in the status bar of your web browser. In the screenshot below, the page or post ID is 5575 …
(Page ID displayed in your web browser)
Record the ID of the page or post.
Post IDs/Page IDs – Examples Of Uses
Here are a couple of practical ways to use page and post IDs:
Excluding Posts And Pages From Displaying In Your Site Map
In the example below, we 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.) …
(Preventing pages or posts from displaying in a site map)
Preventing Posts Or Pages From Displaying In Your WordPress Sidebar
Another great use for unique page IDs is to exclude them from appearing in your WordPress sidebar.
To do this, simply enter all of the Page IDs for the pages you want to exclude separated by a comma into the Exclude field of the WordPress Pages widget, then click the Save button …
(Prevent pages and posts from showing in the WordPress sidebar)
Prevent Pages And Posts From Appearing In Your Site’s Sitemap
You can also use post and page IDs to exclude pages or posts from your XML sitemap …
(Preventing posts or pages from appearing in the XML sitemap|sidebar)
WP Plugins – Page IDs
If you want to access your page or post IDs on a regular basis, then here are some plugins that you may find useful:
(Reveal IDs Plugin)
This WordPress plugin reveals the IDs for posts, pages, categories, links, media, users, link categories, comments, custom post types, custom taxonomies and tags. It also adds a sortable column header to your Pages and Posts tables …
To access the plugin settings go to Settings > Reveal IDs …
(WP Dashboard – Settings – Reveal IDs)
Learn more about the plugin here:
(99 Robots Show IDs – WordPress Plugin)
99 Robots Show IDs is another useful plugin that lets users see their pages, posts, media, links, users, tags and categories 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)
This plugin not only adds a column of IDs to your Table of Pages/Posts, it also provides a function that lets you copy a list of selected Page/Post 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 posts with many IDs required and finding each ID would be time-consuming.
For more information about this plugin, go here:
Congratulations! Now you know how to easily locate the unique ID of WordPress posts and pages.
"I was absolutely amazed at the scope and breadth of these tutorials! The most in-depth training I have ever received on any subject!" - Myke O'Neill, DailyGreenPost.com
Disclaimer: WordPress and its related trademarks are registered trademarks of Automattic, Inc. This site and the services and products offered on this site are not affiliated, associated, sponsored, or endorsed by WordPress, nor have they been tested, certified, or reviewed by WordPress. The owner, contributors and/or advertisers may derive financial benefit from sales of items reviewed, linked to, or advertised on this site.
Have you found this tutorial useful? Feel free to share this article with anyone thinking of starting their own business online using the social buttons below.