How To Find Your WordPress Page And Post IDs

Learn how to easily find a WordPress post or page ID and why knowing how to locate your post and page IDs can be useful.

WP TutorialDo you need to know how to exclude specific pages and posts from appearing in areas of your website like your sitemap?

Often, the easiest way to do this is to filter your pages or posts by their unique ID.

Your WordPress Post Or Page ID is a unique identifier that WordPress assigns automatically to every post or page created on your site.

Knowing the page or post ID can be useful if for example, you want to exclude pages from showing in your WordPress sitemap, or if you want only certain pages to display in the sidebar section of your site.

In this tutorial, you will learn how to find page and post IDs in your WP website.

How To Find WordPress Post And Page IDs: Step-By-Step Tutorial

To find your page or post ID, log into your site and, depending on which ID you are trying to locate, either go to the Pages screen (if you want the ID of a specific page) or the Posts screen (if you need the ID of a post) …

WP Dashboard - Pages Menu - All Pages

(WP Dashboard – All Pages)

Find 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 Post ID

(Hovering over the title reveals Post ID)

The “ID” value is displayed in the status bar of your browser window. In the image below, the post or page ID is 5575

Page ID

(Page ID displayed in your browser)

Record the ID of the page or post.

WordPress Post Ids/Page IDs – Practical Uses

Here are some examples of using WordPress page and post IDs:

Exclude Posts And Pages From Displaying In A Site Map

In the example below, let’s say that you would like to exclude a page whose unique ID is “26” from displaying to visitors on a site map.

Many site map plugins include fields that let you specify the IDs of items you want to exclude (e.g. categories, pages, etc.) …

Preventing posts or pages from appearing in a site map

(Preventing pages or posts from showing in a site map)

Prevent Pages And Posts From Showing In Your WordPress Sidebar

Another practical use for page IDs is to prevent them from displaying in the sidebar section of your web site.

Just 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 posts or pages from displaying in the sidebar

(Preventing pages or posts from displaying in your WordPress sidebar)

Exclude Posts And Pages From Showing In A Sitemap

You can also use page and post IDs to exclude pages or posts from your site’s XML sitemap …

Prevent pages and posts from showing in an XML sitemap|sidebar

(Excluding posts and pages from appearing in your XML sitemap|sidebar)

WP Plugins – Page/Post IDs

If you would like to know the IDs of your posts or pages inside your admin area when you log in, then here are a few FREE plugins you may find useful:

Reveal IDs

Reveal IDs - WP Plugin

(Reveal IDs – WordPress Plugin)

This free plugin displays 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 Posts and Pages tables …

Posts Screen - ID Column

(ID Column)

You can access the plugin settings option by going to Settings > Reveal IDs

Settings - Reveal IDs

(Settings – Reveal IDs)

Learn more about the plugin here: Reveal IDs

99 Robots Show IDs

99 Robots Show IDs - WP Plugin

(99 Robots Show IDs Plugin For WordPress)

99 Robots Show IDs is a free plugin that displays your pages, posts, links, media, 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.

Learn more about the plugin here: 99 Robots Show IDs – WP Plugin

ID ARRAYS

ID Arrays Plugin For WordPress

(ID Arrays WP Plugin)

This plugin 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 Page/Post IDs to your clipboard.

ID Arrays lets you select and copy a list of 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 with many IDs required and finding each ID would be time-consuming.

To learn more about this plugin, go here: ID Arrays – WordPress Plugin

***

Congratulations, now you know how to locate the unique ID of WordPress pages and posts.

***

"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: This site has no association with WordPress or any of the products written about on this website. We may derive a financial benefit or affiliate commission from sales of any services and/or products mentioned on our website. All images remain the copyright of their respective owners and have been used only for illustrative or training purposes.

***

Did you enjoy this article? If so, please consider sharing this information with anyone thinking of starting their own business online using the share buttons below.

Author: Martin Aranovitch

WPCompendium.org provides hundreds of FREE WordPress tutorials for beginners. Our detailed step-by-step tutorials will save you money and teach you how to start, manage, and grow a website or blog using WordPress that puts you in complete control and delivers results with no coding skills required!