How to find page ID in WordPress 2.7
One of the changes in WordPress 2.7 release is the disappearance of page id column from the admin console. As far as I know, currently there is no way to display the page id column.
Page ids can be used to exclude or arrange links to the pages in the navigation menu.
I use page id to exclude certain pages from appearing in my navigation menu.
So, without the convenient page id column how do you determine the page id for a particular page?
There are some plugins available that add the page id column back to your admin console.
But there is a simple way to determine the page id without installing any plugin.
Here is what you need to do to find the id of any page.
- Log in to your WordPress admin console.
- Click on Pages link, to go to the Edit Pages page.
- You will see a list of all the pages with their names hyperlinked.
- Hover your mouse over the name of the page whose id you need.
- Keep an eye on your browser’s status bar.
- In the status bar, following the name of the page you will see something like “?action=edit&post=12”
- The number after “post=” is your page id. (12 in this example).
Until WordPress re-introduces the Page ID column this is the simplest way of determining the ID of a page.
Enjoy.
Jason
February 20, 2009 @ 8:45 am
This was so helpful! I’ve been looking for my Page IDs for a while now and finally gave up and Googled it.
Thanks!
dyoonet
February 26, 2009 @ 4:29 pm
Exactly what I was looking for. Thanks for sharing your tip! 🙂
Soccergoalx
May 2, 2009 @ 4:26 am
Thanks for your information. I was struggling to look for the page ID.
Chris
May 6, 2009 @ 10:26 am
Excellent! Thank you very much!
John
May 7, 2009 @ 6:08 am
How do we determine content via the page ID for 2.7?
if ($page->ID == 31) {}
no longer works!
Stephenie
August 18, 2010 @ 7:44 am
I’m using 2.9.2 and this works. I just didn’t know to look in the status bar. Thanks so much!!!
yogesh patel
October 22, 2010 @ 6:12 am
what is diffrence between $page->ID and $post->ID .
$page-ID doesn’t work in header.php but fine in classes.php
where as $post->works in header.php
randir
February 23, 2011 @ 10:34 am
how to find page id of URLs like “mysite.com/archives” ?
Saravanan
August 28, 2011 @ 8:44 am
The information was very helpful. Thank you.
SecurityNXT
September 3, 2011 @ 3:43 am
Valuable information, well written!
Mysorean
September 6, 2011 @ 10:12 am
Very well written. Thanks for the info
luoluo123
September 9, 2011 @ 3:41 am
More good stuff!
lora
November 11, 2011 @ 3:44 pm
how to find page ID if I already set /%postname%/ for my permalinks?
now it just has edit “home” instead of “?action=edit&post=12?
blogidev
February 29, 2012 @ 10:12 pm
this code :
I confuse a page_id to fig last post alway;
destriwomen
April 12, 2012 @ 5:48 am
????????????