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 …

How To Find Your WordPress Page And Post IDsDo you need to know how to exclude general viewing of certain posts and pages 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 Page Or Post ID is a unique identifier that WordPress assigns to every page or post created on your site.

Knowing how to locate the page or post ID is really useful if, for example, you want to exclude pages from displaying in your sitemap, or if you want only certain pages to show in your sidebar.

In this step-by-step tutorial, you will learn how to find the unique ID of WordPress posts and pages.

How To Locate Post And Page IDs In A WordPress Website: Tutorial

To locate 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 (to find a particular page ID) or the Posts screen (if you need IDs of posts) …

WP Dashboard - WP Pages Menu - All Pages

(WP Dashboard – All Pages)

Select the page or post that you would like to know the ID of and hover your mouse over its title …

Hovering over the page title displays Post ID

(Hovering over the title reveals Post ID)

The unique “ID” value is displayed in the status bar of your browser window. In the example below, the ID is 5575

Page ID

(Page ID)

Record the ID of the post or page.

Practical Applications For Page IDs/Post IDs

Here are a few examples of using WordPress post or page IDs:

Preventing Pages Or Posts From Displaying In A Site Map

In the example below, we need to exclude a page whose ID is “26” from displaying to visitors on a site map.

Many site map plugins contain fields that let you specify the IDs of excluded items (e.g. categories, pages, etc.) …

Exclude pages or posts from appearing in your site map

(Excluding posts and pages from appearing in a site map)

Exclude Posts And Pages From Displaying In The Sidebar

Another great use for page IDs is to exclude them from showing in the sidebar.

Simply enter all of the 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 …

Prevent pages or posts from displaying in the WordPress sidebar

(Excluding pages and posts from appearing in your WordPress sidebar)

Prevent Pages And Posts From Showing In An XML Sitemap

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

Prevent posts or pages from displaying in your XML sitemap|sidebar

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

Plugins – Page/Post IDs

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

Reveal IDs

WP Plugin - Reveal IDs

(Reveal IDs WordPress Plugin)

This free plugin displays IDs for posts, pages, categories, links, users, media, link categories, comments, custom taxonomies, custom post types 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 by going to Settings > Reveal IDs

WP Dashboard - Settings - Reveal IDs

(Settings Menu – Reveal IDs)

To learn more about this plugin, go here: 

99 Robots Show IDs

WordPress Plugin - 99 Robots Show IDs

(99 Robots Show IDs WP Plugin)

99 Robots Show IDs is another WordPress plugin that lets users view their pages, posts, links, media, tags, categories and users in the Posts and Pages admin tables. It’s also a super lightweight plugin that supports custom post types  and taxonomies.

To download this plugin, go here:


ID Arrays Plugin

(ID Arrays)

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 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 pages where many IDs are required and finding IDs one by one 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.

How To Find Your WordPress Page And Post IDs


"If you're new to WordPress, this can stand on its own as a training course and will stay with you as you progress from beginner to advanced and even guru status." - Bruce (Columbus, Ohio)