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 general access to certain posts and pages in areas of your site like your sitemap?

One of the easiest ways to do this is to filter your pages or posts by ID.

Your WordPress Page ID is a unique number assigned by WordPress to every page or post you create.

Knowing the post or page ID can be 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 The Unique ID Of Any Post Or Page In WordPress: Step-By-Step Tutorial

To locate the ID of a page or post, log into your site’s admin and, depending on which ID you are trying to locate, either go to the Pages section (if you need IDs of pages) or the Posts area (for post IDs) …

WP Dashboard - All Pages

(WP Dashboard – Pages Menu – All Pages)

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

Hovering over the title displays Post ID

(Hover over the post title to see Page or Post ID)

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

Page ID

(Page ID)

Write down the ID of the page or post.

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

Here are some practical uses for WordPress page and post IDs:

Exclude Pages And Posts From Appearing In Your Site Map

Let’s say 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 items you want to exclude (e.g. categories, pages, etc.) …

Preventing pages or posts from appearing in your site map

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

Exclude Pages Or Posts From Showing In Your Sidebar

Another practical use for page IDs is to exclude them from displaying in the sidebar section of your website.

To do this, 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 …

Preventing pages or posts from showing in the WordPress sidebar

(Preventing pages or posts from showing in your sidebar)

Exclude Pages Or Posts From Displaying In Your Sitemap

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

Preventing posts or pages from appearing in your XML sitemap|sidebar

(Exclude posts or pages from showing in an XML sitemap|sidebar)

Plugins – Page/Post IDs

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

Reveal IDs

Reveal IDs - WordPress Plugin

(Reveal IDs – WordPress Plugin)

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

ID Column

(ID Column)

To access the plugin settings go to Settings > Reveal IDs

WP Dashboard - Settings - Reveal IDs

(Settings Menu – Reveal IDs)

Download the plugin here: 

99 Robots Show IDs

99 Robots Show IDs

(99 Robots Show IDs WordPress Plugin)

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

Download this plugin here:


ID Arrays WP Plugin

(ID Arrays Plugin)

This plugin not only displays a column of IDs in your Table of Posts/Pages, it also provides a very useful function that lets you copy a list of selected Page/Post IDs to your clipboard.

ID Arrays allows you to select and copy a list of Post/Page IDs to your clipboard

(ID Arrays allows you to 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 posts where many IDs are required and the process of finding each ID would be time-consuming.

Learn more about this plugin here:

Congratulations! Now you know how to easily find your WP post or page ID.

How To Find Your WordPress Page And Post IDs


"I have used the tutorials to teach all of my clients and it has probably never been so easy for everyone to learn WordPress ... Now I don't need to buy all these very expensive video courses that often don't deliver what they promise." - Stefan Wendt, Internet Marketing Success Group

Originally published as How To Find Your WordPress Page And Post IDs.