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 specific posts or pages from appearing 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 Post Or Page ID is a unique number assigned automatically to every page or post you create.

Knowing your post or page ID can be very useful if for example, you want to exclude pages from displaying in your sitemap, or if you want only selected pages to display in the sidebar.

In this step-by-step tutorial, you will learn how to locate your WordPress page or post ID.

How To Find A WordPress Post Or Page ID: Tutorial

To find your page or post ID, log into your site’s admin and either go to the Pages section (to see page IDs) or the Posts screen (if you want IDs of posts) …

WP Dashboard - WordPress Pages Menu - All Pages

(WP Dashboard – Pages Menu – All Pages)

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

Hovering over the page title reveals Post ID

(Hover over the page title to view Post ID)

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

Page ID

(Page ID displayed in your browser)

Write down the ID of the post or page.

WordPress Post/Page ID – When To Use

Here are a few examples of using post and page IDs:

Preventing Posts And Pages From Appearing In Your Site Map

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

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

Preventing pages or posts from appearing in a site map

(Excluding posts and pages from appearing in a site map)

Preventing Posts And Pages From Appearing In Your Sidebar

Another practical use for unique page IDs is to exclude them from showing in the sidebar section of your web site.

Simply 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, and click the Save button …

Prevent pages or posts from showing in the WordPress sidebar

(Preventing posts or pages from appearing in the sidebar)

Prevent Posts And Pages From Appearing In An XML Sitemap

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

Preventing posts and pages from appearing in your XML sitemap|sidebar

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

WordPress Plugins – Page IDs

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

Reveal IDs

WP Plugin - Reveal IDs

(Reveal IDs Plugin For WordPress)

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

ID Column

(Posts Screen – ID Column)

To access the plugin settings go to Settings > Reveal IDs

WP Dashboard - Settings - Reveal IDs

(WP Dashboard – Settings – Reveal IDs)

Download the plugin here: 

99 Robots Show IDs

WP Plugin - 99 Robots Show IDs

(99 Robots Show IDs WP Plugin)

99 Robots Show IDs is another useful plugin that displays your posts, pages, links, media, categories, tags and users in the Pages and Posts 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 WP Plugin

(ID Arrays – WordPress Plugin)

ID Arrays not only displays a column of IDs in your Table of Posts/Pages, it also provides a function that lets you copy a list of selected Post/Page IDs to your clipboard.

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

(ID Arrays allows you to 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 with many IDs required and the process of finding each ID would be time-consuming.

For more information about this plugin, go here:

Congratulations! Now you know how to locate page and post IDs in WordPress.

How To Find Your WordPress Page And Post IDs

***

"These tutorials have so much information and are easy to understand. If you use WordPress or plan to in the future these will help you with everything you need to know." - Valisa (Mesa, Arizona)