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 public viewing of specific pages or posts in areas of your site like your sitemap?

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

Your WordPress Page ID is a unique identifier assigned automatically to every page or post that you create on your site.

Knowing your page or post ID can be really useful if, for example, you want to prevent 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 will learn how to easily find the post or page ID in your WP blog.

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

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

WP Dashboard - WP Pages Menu - All Pages

(WP Dashboard – WP Pages Menu)

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

Hover over the page title to see Post ID

(Hovering over the page title displays Post ID)

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

Page ID displayed in your web browser

(Page ID displayed in your web browser)

Record the ID of the page or post.

Uses For Page IDs/Post IDs

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

Excluding Pages And Posts From Showing In Your Site Map

Suppose you would like 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.) …

Excluding pages and posts from appearing in your site map

(Prevent pages and posts from displaying in your site map)

Excluding Posts Or Pages From Appearing In The WordPress Sidebar

Another practical use for unique page IDs is to exclude them from displaying in the sidebar.

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

Preventing pages and posts from showing in your sidebar

(Excluding posts and pages from appearing in the sidebar)

Prevent Posts And Pages From Showing In Your Sitemap

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

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

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

Plugins – Page IDs

If you would like to access your page or post IDs ”at-a-glance”, then here are some WordPress plugins that you may find useful:

Reveal IDs

Reveal IDs - WordPress Plugin

(Reveal IDs)

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

Posts Screen - ID Column

(Posts Screen – 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

WordPress Plugin - 99 Robots Show IDs

(99 Robots Show IDs – WordPress Plugin)

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

Download the plugin here:

ID ARRAYS

ID Arrays Plugin For WordPress

(ID Arrays WordPress Plugin)

ID Arrays not only adds a column of IDs to your Table of Pages/Posts, it also provides a very useful 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 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.

For more information about this plugin, go here:

Congratulations! Now you know how to easily find page and post IDs in a WordPress site.

How To Find Your WordPress Page And Post IDs

***

"I love the way your email series "Infinite Web Content Creation Training Series" is documented and presented. It is very absorbing and captivating. The links and tutorials are interesting and educational. This has motivated me to rewrite my content following the concepts I am learning from the email series." - Mani Raju, www.fortuneinewaste.com