Do you need to know how to prevent specific pages and posts from displaying 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 ID is a unique number that WordPress assigns to every page or post that you create on your site.
Knowing how to find the ID can be very useful if, for example, you want to prevent pages from showing in your sitemap, or if you want only selected pages to display in the sidebar section of your website or blog.
In this tutorial you will learn how to easily locate the ID of any WordPress page or post.
How To Find The Unique ID Of Any WordPress Page Or Post: Step-By-Step Tutorial
To locate the ID of any page or post, log into your WordPress site’s administration area and either go to the Pages section (if you want to find page IDs), or the Posts area (if you want the ID of a specific post) …
Locate the page or post that you want to know the ID of and hover your mouse over the title …
The unique “ID” value is displayed in the status bar of your web browser. In the screenshot below, the post or page ID is 5575 …
Write down the ID of the page or post.
Post IDs/Page IDs – Practically, What Can It Be Used For?
Here are a couple of practical applications for page and post IDs:
Preventing Pages Or Posts From Appearing In A Site Map
Let’s say you need to prevent 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 items you want to exclude (e.g. categories, pages, etc.) …
Exclude Pages And Posts From Displaying In Your Sidebar
Another useful application for page IDs is to prevent them from appearing in your WordPress sidebar.
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 Posts Or Pages From Appearing In A XML Sitemap
You can also use page and post IDs to exclude posts or pages from your XML sitemap …
If you would like to regularly access the IDs of all your pages or posts, then here are a few FREE WordPress plugins that you may find useful:
This WordPress plugin reveals 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 Posts and Pages tables …
To access the plugin settings go to Settings > Reveal IDs …
Download this plugin here: Reveal IDs – WP Plugin
99 Robots Show IDs is another useful WordPress plugin that displays your posts, pages, links, media, users, tags and categories 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: 99 Robots Show IDs – WP Plugin
Congratulations! Now you know how to find the unique ID of WordPress posts and pages.
Did you find this tutorial useful? Take a moment to share this tutorial with your friends.