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 exclude public access to certain pages and posts in areas of your site like your sitemap?

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

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

Knowing your page or post ID can be very useful if for example, you want to prevent pages from showing in your sitemap, or if you want only selected pages to display in your WordPress sidebar.

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

Finding WordPress Page And Post IDs: Step-By-Step Tutorial

To locate your page or post ID, log into your WordPress administration area and either go to the Pages section (if you need page IDs) or the Posts area (for IDs of posts) …

WP Dashboard - WP Pages Menu - All Pages

(WP Dashboard – Pages Menu)

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

Hover over the title to see Post ID

(Hover over the page title to display Page or Post ID)

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

Page ID displayed in your web browser

(Page ID)

Note down the ID of the page or post.

Practical Applications For Post/Page IDs

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

Exclude Pages And Posts From Displaying In A Site Map

In the example below, we need to exclude a page whose 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.) …

Excluding posts and pages from appearing in a site map

(Preventing pages or posts from appearing in your site map)

Excluding Pages And Posts From Appearing In Your Sidebar

Another practical use for unique page IDs is to prevent them from appearing in your WordPress sidebar.

Simply enter all of the Page IDs for the pages you want to exclude separated by a comma into the Exclude field of the Pages widget, then click the Save button …

Prevent pages and posts from showing in the sidebar

(Exclude posts and pages from showing in the WordPress sidebar)

Excluding Posts Or Pages From Appearing In An XML Sitemap

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

Prevent pages or posts from displaying in the XML sitemap|sidebar

(Exclude posts or pages from displaying in an XML sitemap|sidebar)

WordPress Plugins – Page IDs

If you would like to regularly access your page or post IDs, then here are some plugins that you may find useful:

Reveal IDs

Reveal IDs - WP Plugin

(Reveal IDs Plugin For WordPress)

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

ID Column

(ID Column)

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

Settings Menu - Reveal IDs

(Settings Menu – Reveal IDs)

For more information about this plugin, go here: 

99 Robots Show IDs

99 Robots Show IDs - WordPress Plugin

(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 Posts and Pages admin tables. It’s also a very lightweight plugin that supports custom post types  and taxonomies.

To learn more about this plugin, go here:

ID ARRAYS

ID Arrays Plugin For WordPress

(ID Arrays)

ID Arrays 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 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 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 the process of finding each ID would be time-consuming.

Download this plugin here:

Congratulations, now you know how to easily locate page and post IDs in your WP website.

How To Find Your WordPress Page And Post IDs

***

"I am beyond impressed with what you have put together. I can tell that you put a ton of hard work into building what you have. You have the absolute best content on WordPress I have ever seen!" - Robert T. Jillie

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