WordPress For Non-Techies: Free WordPress Tutorials – WPCompendium.org

How To Find Your WordPress Page And Post IDs

Do you need to know how to exclude specific posts or pages from displaying in areas of your website like your sitemap?

Often, the easiest way to do this is to filter your pages or posts by their unique ID.

Your WordPress Post Or Page ID is a unique number assigned by WordPress to every page or post you create on your site.

Knowing how to find the 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 certain pages to display in your WordPress sidebar.

In this tutorial, you will learn how to locate the unique ID of WordPress pages and posts.

How To Find Post And Page IDs In A WordPress Website: Step-By-Step Tutorial

To find your page or post ID, log into your WordPress administration area and either go to the Pages area (if you need to find a specific page ID) or the Posts section (if you want IDs of posts) …

(WP Dashboard – WordPress Pages Menu)

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

(Hovering over the title displays Post ID)

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

(Page ID)

Write down the ID of the page or post.

Practical Applications For Post ID/Page ID

Here are a few examples of using WordPress post or page IDs:

Prevent Pages And Posts From Displaying In Your Site Map

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

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

(Excluding pages or posts from showing in a site map)

Preventing Posts Or Pages From Appearing In Your WordPress Sidebar

Another practical use for page IDs is to prevent them from displaying in the sidebar section of your blog.

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

(Excluding posts and pages from showing in the WordPress sidebar)

Preventing Posts And Pages From Displaying In Your XML Sitemap

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

(Exclude posts or pages from showing in your XML sitemap|sidebar)

Plugins – Page IDs

If you want to see the IDs of your pages or posts ”at-a-glance”, then here are some plugins you may find useful:

Reveal IDs

(Reveal IDs Plugin)

This free plugin displays 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)

To access the plugin settings go to Settings > Reveal IDs

(Settings – Reveal IDs)

Learn more about this plugin here: 

99 Robots Show IDs

(99 Robots Show IDs)

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

Learn more about the plugin here:

ID ARRAYS

(ID Arrays WordPress Plugin)

ID Arrays not only displays a column of IDs in 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 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 finding each ID would be time-consuming.

To download this plugin, go here:

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

***

"If you're new to WordPress, this can stand on its own as a training course and will stay with you as you progress from beginner to advanced and even guru status." - Bruce (Columbus, Ohio)