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 access to certain posts or 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 Post ID is a unique number assigned to every page or post that you create on your site.

Knowing how to find the post or page ID can be useful if, for example, you want to prevent pages from showing in your sitemap, or if you want only certain pages to display in your sidebar.

In this step-by-step tutorial, you will learn how to locate the ID of any post or page in WordPress.

How To Locate The Page Or Post ID In WordPress: Tutorial

To find the unique ID of any page or post, log into your site and either go to the Pages section (to find IDs of pages) or the Posts screen (if you want post IDs) …

WP Dashboard - Pages Menu

(WP Dashboard – WP Pages Menu)

Locate the page or post that you would like 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 Page or Post ID)

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

Page ID displayed in your browser

(Page ID)

Write down the ID of the post or page.

Post ID/Page ID – What Can It Be Used For?

Here are a few practical applications for post and page IDs:

Exclude Pages Or Posts From Showing In A Site Map

Suppose you need to exclude a page whose 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.) …

Preventing pages and posts from displaying in a site map

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

Prevent Posts Or Pages From Appearing In Your WordPress Sidebar

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

Just 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 …

Preventing posts or pages from showing in the WordPress sidebar

(Exclude pages and posts from showing in the sidebar)

Prevent Posts Or Pages From Showing In A Sitemap

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

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

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

Plugins – Page IDs

If you want to see your page or post IDs on a regular basis, then here are some plugins that you may find useful:

Reveal IDs

Reveal IDs

(Reveal IDs Plugin For WordPress)

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

Posts Screen - ID Column

(ID Column)

To access the plugin settings go to Settings > Reveal IDs

WP Dashboard - Settings - Reveal IDs

(Settings Menu – Reveal IDs)

Learn more about the plugin here: 

99 Robots Show IDs

99 Robots Show IDs - WordPress Plugin

(99 Robots Show IDs Plugin For WordPress)

99 Robots Show IDs is another plugin that lets users view their posts, pages, media, links, categories, users and tags in the Pages and Posts admin tables. It’s also a very 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 function that lets you copy a list of selected Post/Page 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 the process of finding IDs one by one would be time-consuming.

Download the plugin here:

Congratulations, now you know how to easily find the unique ID of any post or page in WordPress.

How To Find Your WordPress Page And Post IDs


"Learning WordPress has been a huge stumbling block for me. I've been looking for something that covers absolutely everything but doesn't cost an arm and a leg. Thank you so much ... you have just provided me with what I have been looking for! Truly appreciated!" - Tanya