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 prevent public viewing of specific posts and pages in areas of your site like your sitemap?

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

Your WordPress Page ID is a unique identifier that WordPress assigns to every post or page you create.

Knowing your page or post ID can be quite useful if for example, you want to prevent pages from displaying in your WordPress sitemap, or if you want only certain pages to show in your sidebar.

In this step-by-step tutorial, you will learn how to locate the ID of posts and pages in your WP site.

How To Find The Unique ID Of A Post Or Page In WordPress: Step-By-Step Tutorial

To find the ID of a page or post, log into your site and either go to the Pages section (to find the ID of a specific page) or the Posts area (if you need to find a specific post ID) …

WP Dashboard - WP Pages Menu

(WP Dashboard – All Pages)

Locate the page or post that you want to know the ID of and hover your mouse over its title …

Hover over the title to view Post ID

(Hovering over the page title displays Post ID)

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

Page ID displayed in your browser

(Page ID)

Note down the ID of the post or page.

Practical Uses For Page IDs/Post IDs

Here are a couple of examples of using WordPress page and post IDs:

Preventing Pages And Posts From Showing In Your Site Map

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

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

Prevent posts and pages from appearing in a site map

(Prevent pages or posts from displaying in your site map)

Exclude Pages Or Posts From Displaying In Your Sidebar

Another useful application for unique page IDs is to exclude them from showing in your WordPress sidebar.

To do this, just enter all of the Page IDs for the pages you want to exclude separated by a comma into the Exclude field of the Pages widget, then click the Save button …

Prevent pages and posts from displaying in the sidebar

(Prevent pages and posts from appearing in the sidebar)

Excluding Posts And Pages From Showing In An XML Sitemap

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

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

(Preventing pages or posts from displaying in an XML sitemap|sidebar)

WordPress Plugins – Page IDs

If you would like to access the IDs of all your posts or pages ”at-a-glance”, then here are some WordPress plugins you may find useful:

Reveal IDs

Reveal IDs - WordPress Plugin

(Reveal IDs – WordPress Plugin)

This WordPress plugin displays IDs for pages, posts, categories, links, media, users, link categories, comments, custom taxonomies, custom post types and tags. It also adds a sortable column header to your Pages and Posts tables …

ID Column

(Posts Area – ID Column)

To access the plugin settings go to Settings > Reveal IDs

WP Dashboard - Settings - Reveal IDs

(WP Dashboard – Settings – Reveal IDs)

For more information about this plugin, go here: 

99 Robots Show IDs

99 Robots Show IDs

(99 Robots Show IDs)

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

Learn more about this plugin here:


ID Arrays - WordPress Plugin

(ID Arrays Plugin For WordPress)

ID Arrays not only displays a column of IDs in your Table of Posts/Pages, 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 Page/Post IDs to your clipboard

(ID Arrays allows you to select and copy a list of Page/Post 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 IDs one by one would be time-consuming.

Download the plugin here:

Congratulations! Now you know how to easily locate your WordPress post or page ID.

How To Find Your WordPress Page And Post IDs


"Your training is the best in the world! It is simple, yet detailed, direct, understandable, memorable, and complete." Andrea Adams,