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 IDsEver wondered how to prevent certain pages and posts from appearing 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 number assigned by WordPress automatically to every post or page that you create on your site.

Knowing the post or page ID is useful if for example, you want to exclude pages from showing in your sitemap, or if you want only selected pages to show in the Pages Widget.

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

How To Find A Post Or Page ID In Your WordPress Blog: Step-By-Step Tutorial

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

WP Dashboard - 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 title displays Post ID

(Hovering over the page title reveals Page or Post ID)

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

Page ID displayed in your web browser

(Page ID displayed in your web browser)

Record the ID of the post or page.

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

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

Exclude Pages And Posts From Showing In A Site Map

Let’s say we would like to exclude a page whose ID is “26” from displaying to visitors on a site map.

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

Exclude posts or pages from appearing in your site map

(Preventing pages or posts from showing in a site map)

Prevent Posts Or Pages From Showing In The Sidebar

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

To do this, simply enter all of the WordPress 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 the WordPress sidebar

(Preventing pages and posts from showing in your sidebar)

Excluding Pages And Posts From Displaying In An XML Sitemap

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

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

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

WP Plugins – Page/Post IDs

If you want to regularly access the IDs of all your pages or posts, then here are some plugins that you may find useful:

Reveal IDs

Reveal IDs

(Reveal IDs Plugin For WordPress)

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

Posts Screen - ID Column

(Posts Screen – ID Column)

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

WP Dashboard - Settings - Reveal IDs

(WP Dashboard – Settings – Reveal IDs)

Download this plugin here: 

99 Robots Show IDs

99 Robots Show IDs

(99 Robots Show IDs)

99 Robots Show IDs is a free plugin that displays your posts, pages, media, links, 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 the plugin here:

ID ARRAYS

ID Arrays WordPress Plugin

(ID Arrays)

This plugin not only adds a column of IDs to your Table of Posts/Pages, it also provides a very useful 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 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 posts where many IDs are required and the process of finding each ID would be time-consuming.

To download this plugin, go here:

Congratulations, now you know how to easily locate the ID of WordPress pages and posts.

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

For a white label version of this tutorial visit WPTrainingManual.com.
Originally published as How To Find Your WordPress Page And Post IDs.