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 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 identifier that WordPress assigns to every page or post you create.

Knowing your page or post ID is useful if for example, you want to prevent pages from displaying in your WordPress sitemap, or if you want only certain pages to display in the sidebar.

In this step-by-step tutorial, you are going to learn how to locate the ID of a WordPress page or post.

How To Locate A Page Or Post ID In Your WordPress Website: Tutorial

To find the unique ID of any page or post, log into your site’s dashboard and, depending on which ID you are trying to locate, either go to the Pages area (for IDs of pages) or the Posts screen (for a specific post ID) …

WP Dashboard - Pages Menu - All Pages

(WP Dashboard – WP Pages Menu)

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 display Post ID

(Hovering over the page title reveals Page or Post ID)

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

Page ID displayed in your browser

(Page ID)

Note down the ID of the post or page.

Post/Page ID – When To Use

Here are some practical ways to use WordPress post or page IDs:

Preventing Posts Or Pages From Appearing In Your Site Map

Let’s say we need to prevent a page whose ID is “26” from displaying to visitors on a site map.

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

Exclude posts or pages from appearing in your site map

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

Excluding Posts And Pages From Showing In The WordPress Sidebar

Another useful application for unique page IDs is to exclude them from displaying in your WordPress sidebar.

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

Prevent pages and posts from displaying in your sidebar

(Prevent pages and posts from appearing in the sidebar)

Preventing Posts Or Pages From Appearing In An XML Sitemap

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

Exclude pages or posts from displaying in your XML sitemap|sidebar

(Prevent pages and posts from displaying in your XML sitemap|sidebar)

WordPress Plugins – Page/Post IDs

If you need to access your page or post IDs on a regular basis, then here are some plugins that you may find useful:

Reveal IDs

Reveal IDs - WP Plugin

(Reveal IDs – WordPress Plugin)

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

(Posts Area – ID Column)

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

Settings - Reveal IDs

(Settings Menu – Reveal IDs)

To download this plugin, go here: 

99 Robots Show IDs

99 Robots Show IDs

(99 Robots Show IDs WordPress Plugin)

99 Robots Show IDs is a free plugin that lets users see their posts, pages, media, links, categories, tags and users in the Posts and Pages admin tables. It’s also a super lightweight plugin that supports custom post types  and taxonomies.

To download this plugin, go here:

ID ARRAYS

ID Arrays - WordPress Plugin

(ID Arrays WP Plugin)

ID Arrays not only displays a column of IDs in your Table of Pages/Posts, it also provides a very useful 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 pages where many IDs are required and finding each ID would be time-consuming.

Learn more about the plugin here:

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

How To Find Your WordPress Page And Post IDs

***

"Your training is the best in the world! It is simple, yet detailed, direct, understandable, memorable, and complete." Andrea Adams, FinancialJourney.org

Disclaimer: This site has no direct association with WordPress or any of the products written about on this website. We may receive financial benefits or affiliate commissions from purchases of any third-party products and services advertised on this website. All product images are the copyright of their respective owners, comply with all license terms and agreements of use are being used solely for training or illustrative purposes.

***

Did you enjoy this article? If so, please take a moment and share this page using the share buttons below.

Author: Martin Aranovitch

Martin Aranovitch is the founder of WPCompendium.org and the author of The Small Business Digital Manager. WPCompendium.org provides hundreds of FREE detailed step-by-step tutorials that will teach you how to use WordPress to grow your business online at minimal cost with no coding skills required!

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