Comments: 0Posted on Thursday, July 29th, 2010 by Philip Light

How To Find Page ID’s in WordPress

There are many times when using WordPress plugins that you will need to know a particular Page ID. For instance, if you are building a Site Map using WordPress and want to exclude a certain page from showing up in the Site Map, then you’d need to find the ID of that page and insert it into the settings of the plugin.

Fortunately it’s pretty easy to find the page ID. If you haven’t changed your permalink structure (which you should) then you can simply go to your website, navigate to the page you are looking for, and then look at the URL of the page. It will look something like…

http://www.xyz.com/?p=123

The number after the “p=” part is your Page ID. In this example, the page ID would be ‘123’.

If you have changed your permalink structure and your page URL’s are more like…

http://www.xyz.com/my-page/

…then you will have to dig a little deeper, but not much. In this case, just login to your Admin Center, then go to Pages > Edit and click on the Page you want to find the ID for. Again looking at the URL, you will see something like…

http://www.xyz.com/wp-admin/post.php?post=123&action=edit

In this case, the Page ID is located after the “post=” part, but before the “&”. Again the ID is “123” in this example.

Notes:

  • It’s also sometimes possible to see the URL when you just hover over the Page or Post name, which is a little quicker than clicking on it.
  • You can also get the ID of a Post the same way, just go to Posts > Edit then click on the Post.
  • You also sometimes need to Get the Category ID in WordPress.
Print This Post Print This Post
Category: WordPress How To's

Leave a Reply