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.

Landing Pages for WordPress

WP TutorialEver wondered how to exclude general access to specific posts or pages in areas of your website like your sitemap?

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

Your WordPress Page ID is a unique identifier assigned by WordPress automatically to every post or page created on your site.

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

In this step-by-step tutorial, you are going to learn how to find WordPress post and page IDs.

How To Locate Page And Post IDs In A WordPress Blog: Step-By-Step Tutorial

To locate the ID of a page or post, log into your site’s dashboard and either go to the Pages area (if you need to find IDs of pages) or the Posts screen (to find IDs of posts) …

WP Dashboard - WP Pages Menu

(WP Dashboard – Pages Menu)

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

Hover over the page title to view Page or Post ID

(Hover over the post title to display Post ID)

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

Page ID

(Page ID displayed in your browser)

Record the ID of the post or page.

Practical Uses For Post ID/Page ID

Here are some practical ways to use WordPress post and page IDs:

Exclude Posts Or Pages From Appearing In Your Site Map

Let’s say we need to prevent 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.) …

Exclude posts or pages from appearing in a site map

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

Excluding Posts And Pages From Displaying In Your Sidebar

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

To do this, simply 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, and click the Save button …

Prevent posts and pages from showing in your sidebar

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

Exclude Posts Or 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 …

Exclude pages or posts from showing in your XML sitemap|sidebar

(Preventing pages and posts from appearing in an XML sitemap|sidebar)

WP Plugins – Page IDs

If you would like to see all of your page or post IDs ”at-a-glance”, then here are some plugins you may find useful:

Reveal IDs

WordPress Plugin - Reveal IDs

(Reveal IDs Plugin For WordPress)

This free plugin displays IDs for posts, pages, links, categories, 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 …

ID Column

(Posts Table – ID Column)

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

Settings Menu - Reveal IDs

(Settings – Reveal IDs)

Learn more about this plugin here: Reveal IDs

99 Robots Show IDs

99 Robots Show IDs

(99 Robots Show IDs)

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

To download this plugin, go here: 99 Robots Show IDs


ID Arrays - WordPress Plugin

(ID Arrays 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 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 Page/Post 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.

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


Congratulations! Now you know how to easily locate the ID of any WordPress page or post.


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

Disclaimer: WordPress and its related trademarks are registered trademarks of Automattic, Inc. This site and the services and products offered on this site are not affiliated, associated, sponsored, or endorsed by WordPress, nor have they been certified, tested, or reviewed by WordPress. The owner, contributors and/or advertisers may derive financial benefit from sales of items reviewed, advertised, or linked from this site.


Did you enjoy this post? If so, please share this tutorial with other WordPress users using the share buttons below.

Author: Martin Aranovitch 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!