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 …

For a white label version of this tutorial visit WPTrainingManual.com.

How To Find Your WordPress Page And Post IDsEver wondered how to exclude general viewing of specific pages and posts in areas of your website like your sitemap?

One of the easiest ways to do this is to filter your pages or posts by their unique ID.

Your WordPress Post ID is a unique number assigned by WordPress to every page or post you create.

Knowing how to locate the page or post ID can be useful if, for example, you want to exclude pages from showing in your WordPress sitemap, or if you want only certain pages to show in the sidebar.

In this tutorial, you are going to learn how to locate your post or page ID in WordPress.

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

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

WP Dashboard - Pages Menu

(WP Dashboard – All Pages)

Locate 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 see Post ID

(Hovering over the title reveals Page or Post ID)

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

Page ID

(Page ID displayed in your browser)

Note down the ID of the post or page.

Practical Uses For Post ID/Page ID

Here are a couple of practical ways to use WordPress post and page IDs:

Exclude Posts Or Pages From Appearing In A Site Map

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

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

Preventing pages or posts from displaying in your site map

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

Preventing Pages Or Posts From Showing In Your Sidebar

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

To do this, just 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 …

Exclude posts and pages from showing in your sidebar

(Exclude pages or posts from displaying in your sidebar)

Prevent Pages And Posts From Showing In Your Site’s Sitemap

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

Exclude posts and pages from displaying in the XML sitemap|sidebar

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

WordPress Plugins – Page/Post IDs

If you want to regularly access your post or page IDs, then here are some WordPress plugins you may find useful:

Reveal IDs

WP Plugin - Reveal IDs

(Reveal IDs – WordPress Plugin)

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

Posts Area - ID Column

(ID Column)

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

WP Dashboard - Settings - Reveal IDs

(Settings – Reveal IDs)

Download the plugin here: 

99 Robots Show IDs

WP Plugin - 99 Robots Show IDs

(99 Robots Show IDs Plugin)

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

Learn more about this plugin here:

ID ARRAYS

ID Arrays Plugin For WordPress

(ID Arrays)

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 Page/Post IDs to your clipboard.

ID Arrays lets you select and copy a list of Page/Post IDs to your clipboard

(ID Arrays allows you to 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 IDs one by one would be time-consuming.

Download the plugin here:

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

How To Find Your WordPress Page And Post IDs

Get Thrive Leads for WordPress

***

"This is an awesome training series. I have a pretty good understanding of WordPress already, but this is helping me to move somewhere from intermediate to advanced user!" - Kim Lednum

For a white label version of this tutorial visit WPTrainingManual.com.
Originally published as How To Find Your WordPress Page And Post IDs.