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.

WP For BeginnersEver wondered how to exclude public viewing of specific posts or pages in areas of your site 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 that WordPress assigns automatically to every post or page you create on your site.

Knowing how to locate a post or page 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 step-by-step tutorial, you are going to learn how to find the page or post ID in your WP blog.

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

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

WP Dashboard - WP Pages Menu - All Pages

(WP Dashboard – All Pages)

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

Hover over the title to view 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 screenshot below, the page ID is 5575

Page ID displayed in your browser

(Page ID)

Write down the ID of the post or page.

WordPress Page/Post ID – Examples Of Applications

Here are some examples of using WordPress post or page IDs:

Exclude Pages And Posts From Showing In A Site Map

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

Site map plugins typically include fields that let you specify the IDs of excluded items (e.g. categories, pages, etc.) …

Excluding pages or posts from showing in your site map

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

Prevent Posts And Pages From Showing In The WordPress Sidebar

Another great use for page IDs is to prevent them from showing in the sidebar.

To do this, simply enter all of the WordPress 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 …

Preventing pages and posts from displaying in the sidebar

(Exclude posts or pages from displaying in the sidebar)

Excluding Pages And Posts From Appearing In An XML Sitemap

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

Excluding pages or posts from appearing in the XML sitemap|sidebar

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

Plugins – Page IDs

If you need to regularly access your page or post IDs, then here are a few FREE plugins that you may find useful:

Reveal IDs

WP Plugin - Reveal IDs

(Reveal IDs – WordPress Plugin)

This free plugin displays 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 Table - ID Column

(ID Column)

To access the plugin settings go to Settings > Reveal IDs

Settings - Reveal IDs

(Settings – Reveal IDs)

Download this plugin here: Reveal IDs

99 Robots Show IDs

99 Robots Show IDs - WordPress Plugin

(99 Robots Show IDs Plugin For WordPress)

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

Learn more about the plugin here: 99 Robots Show IDs – WordPress Plugin

ID ARRAYS

ID Arrays - WordPress Plugin

(ID Arrays)

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

Download the plugin here: ID Arrays – WordPress Plugin

***

Congratulations! Now you know how to easily locate a post or page ID in WordPress.

***

"I was absolutely amazed at the scope and breadth of these tutorials! The most in-depth training I have ever received on any subject!" - Myke O'Neill, DailyGreenPost.com

Disclaimer: WordPress and its related trademarks are registered trademarks of Automattic, Inc. This site is not affiliated with nor sponsored by Automattic, Inc. or the WordPress Open Source project. This site and the services and products offered on this site are not affiliated, associated, sponsored, or endorsed by WordPress, nor have they been reviewed, certified, or tested by WordPress. The owner, contributors and/or advertisers may derive financial benefit from sales of items advertised, linked to, or reviewed on this site.

***

Did you enjoy this post? If so, please consider using the share buttons below and share this tutorial with other WordPress users.

Author: Martin Aranovitch

WPCompendium.org provides hundreds of FREE WordPress tutorials for beginners. Our detailed step-by-step tutorials will save you money and teach you how to start, manage, and grow a website or blog using WordPress that puts you in complete control and delivers results with no coding skills required!

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