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 IDsDo you need to know how to prevent general viewing of certain 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 their unique ID.

Your WordPress Page Or Post ID is a unique identifier that WordPress assigns to every post or page you create on your site.

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

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

Finding The WP Page Or Post ID: Tutorial

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

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 its title …

Hover over the title to display Page or Post ID

(Hovering over the title reveals Post ID)

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

Page ID displayed in your browser

(Page ID displayed in your browser)

Record the ID of the post or page.

Uses For Post/Page ID

Here are a couple of practical applications for post and page IDs:

Prevent Pages And Posts From Showing In A Site Map

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

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

Exclude pages or posts from showing in a site map

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

Prevent Posts Or Pages From Displaying In Your Sidebar

Another useful application for unique page IDs is to prevent them from showing in your 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 Pages widget, then click the Save button …

Prevent posts or pages from showing in your sidebar

(Prevent pages or posts from showing in your sidebar)

Exclude Pages Or Posts From Displaying In Your XML Sitemap

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

Preventing pages or posts from displaying in the XML sitemap|sidebar

(Exclude posts and pages from showing in an XML sitemap|sidebar)

WordPress Plugins – Page IDs

If you want to see the IDs of all your pages or posts inside your admin area when you log in, then here are a few FREE WordPress plugins you may find useful:

Reveal IDs

Reveal IDs - WP Plugin

(Reveal IDs)

This free WordPress plugin displays 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 Posts and Pages tables …

Posts Table - ID Column

(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 – WordPress Plugin)

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

Learn more about this plugin here:

ID ARRAYS

ID Arrays Plugin For WordPress

(ID Arrays WP Plugin)

This plugin 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 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 Page/Post 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.

Download the plugin here:

Congratulations, now you know how to locate the unique ID of WordPress posts and pages.

How To Find Your WordPress Page And Post IDs

***

"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