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 exclude certain pages or posts from displaying 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 Post ID is a unique identifier assigned automatically to every page or post you create on your site.

Knowing how to find a page or post ID is quite useful if for example, you want to exclude pages from displaying in your sitemap, or if you want only selected pages to display in your WordPress sidebar.

In this tutorial, you are going to learn how to locate page and post IDs in WordPress.

How To Find The WordPress Page Or Post ID: Step-By-Step Tutorial

To find your page or post ID, log into your site and either go to the Pages screen (for page IDs) or the Posts screen (to see a particular post ID) …

WP Dashboard - WordPress Pages Menu - All Pages

(WP Dashboard – 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 Page or Post ID

(Hover over the title to view Post ID)

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

Page ID displayed in your web browser

(Page ID displayed in your browser)

Record the ID of the post or page.

Practical Uses For Page/Post IDs

Here are a couple of practical applications for post and page IDs:

Exclude Posts And Pages From Appearing In A Site Map

In the example below, let’s say that you want to prevent a page whose ID is “26” from displaying to visitors on a site map.

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

Prevent posts and pages from showing in your site map

(Excluding pages and posts from showing in a site map)

Preventing Posts Or Pages From Appearing In The WordPress Sidebar

Another practical use for unique page IDs is to exclude them from appearing in the Pages Widget.

Just enter all of the Page IDs for the pages you want to exclude separated by commas into the Exclude field of the Pages widget, and click the Save button …

Excluding posts and pages from showing in your sidebar

(Excluding pages or posts from appearing in the sidebar)

Excluding Pages Or Posts From Displaying In Your XML Sitemap

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

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

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

Plugins – Page IDs

If you want to access your page or post IDs inside your admin area when you log in, then here are some WordPress plugins you may find useful:

Reveal IDs

WordPress Plugin - Reveal IDs

(Reveal IDs Plugin)

This free plugin reveals IDs for pages, posts, links, categories, 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 Area - ID Column

(Posts Table – ID Column)

To access the plugin settings go to Settings > Reveal IDs

Settings - Reveal IDs

(Settings Menu – Reveal IDs)

To download this plugin, go here: 

99 Robots Show IDs

99 Robots Show IDs - WP Plugin

(99 Robots Show IDs Plugin For WordPress)

99 Robots Show IDs is another plugin that lets users see their posts, pages, 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.

Learn more about the plugin here:

ID ARRAYS

ID Arrays - WordPress Plugin

(ID Arrays Plugin)

ID Arrays not only displays a column of IDs in 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 allows you to 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 with many IDs required and finding each ID would be time-consuming.

Download the plugin here:

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

How To Find Your WordPress Page And Post IDs

***

"This is AMAZING! I had learnt about how to use WordPress previously, but this covers absolutely everything and more!! Incredible value! Thank you!" - Monique, Warrior Forum