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 general access to specific 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 Page ID is a unique number assigned automatically to every page or post you create.

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

In this tutorial, you will learn how to locate the unique ID of pages and posts in a WP blog.

How To Find A Post Or Page ID In WordPress: Tutorial

To locate your page or post ID, log into your site’s dashboard and either go to the Pages section (for IDs of pages) or the Posts section (for IDs of posts) …

WP Dashboard - WordPress Pages Menu - All Pages

(WP Dashboard – WordPress Pages Menu – All Pages)

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

Hovering over the title displays Page or Post ID

(Hovering over the post title displays Post ID)

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

Page ID

(Page ID)

Record the ID of the post or page.

Practical Applications For Page/Post ID

Here are some practical uses for post and page IDs:

Prevent Posts Or Pages From Displaying In A Site Map

Suppose we want to prevent a page whose unique 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.) …

Preventing posts or pages from displaying in your site map

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

Preventing Pages And Posts From Displaying In Your Sidebar

Another great use for unique page IDs is to prevent them from appearing in the sidebar section of your website.

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

Excluding posts or pages from displaying in your sidebar

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

Preventing Pages Or Posts From Appearing In An XML Sitemap

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

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

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

WordPress Plugins – Page IDs

If you would like to regularly access the IDs of all your pages or posts, then here are some WordPress plugins that you may find useful:

Reveal IDs

Reveal IDs

(Reveal IDs Plugin)

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

Posts Table - ID Column

(Posts Screen – ID Column)

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

WP Dashboard - Settings - Reveal IDs

(Settings Menu – Reveal IDs)

To learn more 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 a free plugin that lets users view their pages, posts, media, links, tags, users and categories in the Pages and Posts 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 For WordPress)

ID Arrays not only adds a column of IDs to 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 lets you select and copy a list of Post/Page 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 posts where many IDs are required and finding each ID would be time-consuming.

For more information about this plugin, go here:

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

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