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 general access to specific posts or 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 their unique ID.

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

Knowing your page or post ID can be useful if, for example, you want to exclude pages from displaying in your WordPress 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 locate page and post IDs in WordPress.

How To Find A WP Page Or Post ID: Tutorial

To find your page or post ID, log into your site and either go to the Pages area (for the ID of a particular page) or the Posts section (if you need to find the ID of a particular post) …

WP Dashboard - Pages Menu

(WP Dashboard – WordPress Pages Menu – All Pages)

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

Hovering over the page title displays Post ID

(Hover over the page title to see Post ID)

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

Page ID displayed in your browser

(Page ID)

Write down the ID of the page or post.

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

Here are a few examples of using post or page IDs:

Exclude Pages And Posts From Showing In Your Site Map

In the example below, we would like to prevent a page whose unique ID is “26” from displaying to visitors on a site map.

Many site map plugins include fields that let you specify the IDs of items you want to exclude (e.g. categories, pages, etc.) …

Prevent posts or pages from displaying in a site map

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

Prevent Pages Or Posts From Displaying In The WordPress Sidebar

Another useful application for page IDs is to prevent them from showing in the Pages Widget.

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, then click the Save button …

Preventing posts and pages from displaying in your WordPress sidebar

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

Exclude Posts Or Pages From Showing In Your XML Sitemap

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

Prevent pages or posts from appearing in an XML sitemap|sidebar

(Excluding posts or pages from showing in the XML sitemap|sidebar)

Plugins – Page/Post IDs

If you need to regularly access the IDs of your pages or posts, then here are a few FREE WordPress plugins that you may find useful:

Reveal IDs

Reveal IDs

(Reveal IDs WordPress Plugin)

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

(Posts Screen – ID Column)

To access the plugin settings go to Settings > Reveal IDs

Settings - Reveal IDs

(Settings Menu – Reveal IDs)

Download this plugin here: 

99 Robots Show IDs

WP Plugin - 99 Robots Show IDs

(99 Robots Show IDs – WordPress Plugin)

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

Learn more about this plugin here:

ID ARRAYS

ID Arrays Plugin For WordPress

(ID Arrays WordPress Plugin)

ID Arrays 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 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 pages with many IDs required and the process of finding IDs one by one would be time-consuming.

Download the plugin here:

Congratulations! Now you know how to locate the unique ID of WordPress posts and pages.

How To Find Your WordPress Page And Post IDs

***

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