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 certain pages or posts 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 to every post or page that you create on your site.

Knowing the page or post ID can be quite 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 your WordPress sidebar.

In this tutorial, you are going to learn how to easily find the page or post ID in your WordPress site.

How To Find The ID Of Any WordPress Page Or Post: Tutorial

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

WP Dashboard - Pages Menu - All Pages

(WP Dashboard – Pages Menu)

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

Hover over the post title to view Post ID

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

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

Page ID

(Page ID displayed in your web browser)

Record the ID of the page or post.

WordPress Post/Page IDs – When To Use

Here are a few practical ways to use page or post IDs:

Preventing Posts And Pages From Displaying In Your Site Map

Suppose you need to exclude a page whose 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.) …

Exclude pages or posts from appearing in a site map

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

Preventing Posts And Pages From Appearing In Your Sidebar

Another useful application for page IDs is to prevent them from displaying in the Pages Widget.

To do this, 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, then click the Save button …

Exclude posts and pages from appearing in your WordPress sidebar

(Exclude pages or posts from appearing in the WordPress sidebar)

Prevent Pages Or Posts From Displaying In A Sitemap

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

Exclude pages and posts from showing in your XML sitemap|sidebar

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

Plugins – Page/Post IDs

If you want to regularly access the IDs of your pages or posts, then here are a few FREE WordPress plugins that you may find useful:

Reveal IDs

Reveal IDs

(Reveal IDs Plugin)

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

Posts Area - ID Column

(ID Column)

To access the plugin settings go to Settings > Reveal IDs

Settings - Reveal IDs

(Settings Menu – Reveal IDs)

To learn more about this plugin, go here: Reveal IDs – WP Plugin

99 Robots Show IDs

99 Robots Show IDs

(99 Robots Show IDs Plugin For WordPress)

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

Download the plugin here: 99 Robots Show IDs – WP Plugin

ID ARRAYS

ID Arrays

(ID Arrays)

This plugin 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 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 Post/Page IDs to your clipboard)

This can be very useful if, for example, you are working with a long list of posts with many IDs required and finding each ID would be time-consuming.

Learn more about the plugin here: ID Arrays – WordPress Plugin

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

How To Find Your WordPress Page And Post IDs

[adrotate group="6"]

***

[adrotate group="3"]

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 associated, affiliated, endorsed, or sponsored by WordPress, nor have they been certified, reviewed, or tested by WordPress. The owner, contributors and/or advertisers may derive financial benefit from sales of items linked to, reviewed, or advertised on this site.

***

Did you enjoy this tutorial? Please use the share buttons below to share this post with other WordPress users.

Author: Martin Aranovitch

Martin Aranovitch is the founder of WPCompendium.org and has authored hundreds of FREE WordPress tutorials for non-techies and beginners. WPCompendium.org provides detailed step-by-step tutorials that will teach you how to use WordPress with no coding skills required and grow your business online at minimal cost!

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