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

How To Find Your WordPress Page And Post IDs

Ever wondered how to exclude specific posts or pages from appearing 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 Or Post ID is a unique identifier assigned automatically to every page or post created on your site.

Knowing how to find the post or page ID is really useful if for example, you want to prevent pages from displaying in your sitemap, or if you want only selected pages to show in your sidebar.

In this step-by-step tutorial, you will learn how to find page and post IDs in WordPress.

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

To find your page or post ID, log into your site’s admin and either go to the Pages section (if you need IDs of pages) or the Posts area (to find a particular post ID) …

(WP Dashboard – Pages Menu)

Locate 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 “ID” value is displayed in the status bar of your browser window. In the example below, the ID is 5575

(Page ID displayed in your browser)

Record the ID of the post or page.

Practical Uses For Post ID/Page ID

Here are some practical ways to use page and post IDs:

Exclude Pages And Posts From Showing In A Site Map

Let’s say we would like to prevent 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.) …

(Prevent posts or pages from appearing in your site map)

Preventing Posts And Pages From Displaying In Your Sidebar

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

Just 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 …

(Preventing pages and posts from appearing in the sidebar)

Prevent Pages And Posts From Appearing In An XML Sitemap

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

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

Plugins – Page IDs

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

Reveal IDs

(Reveal IDs Plugin)

This plugin reveals the IDs for pages, posts, links, categories, 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 Screen – ID Column)

To access the plugin settings go to Settings > Reveal IDs

(Settings – Reveal IDs)

To download this plugin, go here: 

99 Robots Show IDs

(99 Robots Show IDs)

99 Robots Show IDs is another useful WordPress plugin that displays your pages, posts, links, media, users, categories and tags 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 – 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 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 the process of finding IDs one by one would be time-consuming.

Download this plugin here:

Congratulations, now you know how to find the ID of a WordPress post or page.

***

"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