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 posts or pages from appearing in areas of your site like your sitemap?

Often, the easiest way to do this is to filter your pages or posts by ID.

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

Knowing the post or page 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 step-by-step tutorial, you are going to learn how to find page and post IDs in WordPress.

How To Locate The Unique ID Of WordPress Pages And Posts: Tutorial

To find your page or post ID, log into your site and, depending on which ID you are trying to locate, either go to the Pages screen (if you want to find page IDs) or the Posts area (for post IDs) …

WP Dashboard - WordPress Pages Menu

(WP Dashboard – All Pages)

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

Hovering over the title reveals Page or Post ID

(Hovering over the title displays Post ID)

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

Page ID displayed in your web browser

(Page ID)

Record the ID of the post or page.

Uses For Post IDs/Page IDs

Here are a few examples of using WordPress page and post IDs:

Excluding Posts And Pages From Displaying In A Site Map

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

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

Exclude pages and posts from appearing in a site map

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

Preventing Pages Or Posts From Appearing In Your WordPress Sidebar

Another great use for unique page IDs is to prevent them from showing in the Pages Widget.

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

Prevent pages or posts from displaying in the sidebar

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

Prevent Pages Or Posts From Showing In Your Sitemap

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

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

(Prevent posts or pages from appearing in the XML sitemap|sidebar)

Plugins – Page IDs

If you need to see all of the IDs of your posts or pages inside your admin area when you log in, then here are some WordPress plugins that you may find useful:

Reveal IDs

WP Plugin - Reveal IDs

(Reveal IDs – WordPress Plugin)

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

ID Column

(Posts Table – ID Column)

To access the plugin settings go to Settings > Reveal IDs

Settings Menu - Reveal IDs

(Settings – Reveal IDs)

To learn more about this plugin, go here: 

99 Robots Show IDs

WP Plugin - 99 Robots Show IDs

(99 Robots Show IDs Plugin For WordPress)

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

To download this plugin, go here:

ID ARRAYS

ID Arrays WordPress Plugin

(ID Arrays Plugin For WordPress)

This plugin not only displays a column of IDs in your Table of Posts/Pages, it also provides a function that lets you copy a list of selected Page/Post 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.

To learn more about this plugin, go here:

Congratulations, now you know how to locate post and page IDs in WordPress.

How To Find Your WordPress Page And Post IDs

***

"This is an awesome training series. I have a pretty good understanding of WordPress already, but this is helping me to move somewhere from intermediate to advanced user!" - Kim Lednum

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