Finding the ID of a WordPress Page or Post

You want to limit user access to certain pages.

You may want to exclude certain pages that appear in the Page Widget.

You find that a theme or plugin you want to use requires an ID when dealing with images, links or categories.

The only way to accomplish any of these tasks is by accessing the individual page or post ID.

WordPress Post ID or WordPress Page ID

In WordPress each post or page has an associated numeric ID. That s a database ID that represents that actual post, media, page, link or essentially anything in WordPress. Each individual ID tells WordPress what post or page, you are saving or viewing.

How Do I Find the Elusive ID

There are two ways to find the ID of a specific page or post:

  1. The technical but faster route: This solution involves sending you to hover over the URL where you can actually see the ID. If you decide to go this route it s important to know the following: You must have the default setting for permalinks under settings on the bottom left of the WordPress dashboard of your site or the page ID will not show up in the URL.If you’d like to go this route and Permalinks are enabled, then follow these steps:

    i. Hover over Pages or Posts in the lefthand menubar on your dashboard
    ii. Select “All Posts” (or Pages)
    iii. Hover over the page you’d like to identify and look at the bottom left of your browser window. There you will see a link like this:
    Screen Shot 2013-05-02 at 1.30.27 PM
    The number following “post=” is the ID you’re looking for.
    If the link doesn’t appear in the bottom left, try right-clicking the page or post title and copying the URL to your clipboard. You can then paste it to a notepad and read it that way.
  2. The Plugin Route: You know how I feel about code and how much I love a good plugin. So in this case I recommend you install the WordPress Show ID Plugin. This plugin in will showcase all the IDs for Posts, Pages, Media, Links, Categories, Tags and Users in the admin tables. It’s that easy.

About the author