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 and pages in areas of your website like your sitemap?

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

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

Knowing how to find the post or page 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 show in the sidebar.

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

How To Find Page And Post IDs In WordPress: Step-By-Step Tutorial

To locate the ID of a page or post, log into your site and either go to the Pages area (if you want IDs of pages) or the Posts section (if you want IDs of posts) …

WP Dashboard - Pages Menu - All Pages

(WP Dashboard – Pages Menu)

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

Hover over the title to see Page or Post ID

(Hover over the page title to display Post ID)

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

Page ID

(Page ID displayed in your web browser)

Note down the ID of the post or page.

Practical Applications For Post IDs/Page IDs

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

Prevent Posts And Pages From Appearing In Your Site Map

Suppose you want to prevent a page whose ID is “26” from displaying to visitors on a site map.

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

Prevent pages or posts from displaying in your site map

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

Prevent Pages Or Posts From Appearing In The WordPress Sidebar

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

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

Exclude posts or pages from showing in the sidebar

(Preventing posts or pages from appearing in your WordPress sidebar)

Preventing Posts Or Pages From Displaying In Your XML Sitemap

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

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

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

Plugins – Page IDs

If you would like to know your post or page IDs inside your admin area when you log in, then here are a few FREE plugins you may find useful:

Reveal IDs

WP Plugin - Reveal IDs

(Reveal IDs Plugin)

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

Download the plugin here: 

99 Robots Show IDs

99 Robots Show IDs - WordPress Plugin

(99 Robots Show IDs – WordPress Plugin)

99 Robots Show IDs is another useful WordPress 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 very lightweight plugin that supports custom post types  and taxonomies.

For more information about this plugin, go here:

ID ARRAYS

ID Arrays WP Plugin

(ID Arrays WP Plugin)

ID Arrays not only adds a column of IDs to 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 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 finding each ID would be time-consuming.

To download this plugin, go here:

Congratulations, now you know how to locate your WordPress post or page ID.

How To Find Your WordPress Page And Post IDs

***

"I have used the tutorials to teach all of my clients and it has probably never been so easy for everyone to learn WordPress ... Now I don't need to buy all these very expensive video courses that often don't deliver what they promise." - Stefan Wendt, Internet Marketing Success Group

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