Affiliate Marketing
Forum Search

Reply
 
LinkBack Thread Tools Display Modes

  #1 (permalink)  
Old 22-06-08
Registered User
 
Join Date: Jun 2007
Posts: 245
Thanks: 0
Thanked 0 Times in 0 Posts
MortimerJazz is an unknown quantity at this point
  Obtaining page ID from WP 2.5.1

Hi there,

I've just upgraded to the new version of WP. I'm trying to put an exclude command in the PHP (to ensure that certain pages don't show up in the menu bar).

However, I can't seem to find where the Page ID is displayed in the new layout.

Can anyone help me at all?
__________________
PKRPoker3D.com - Bonus codes and exclusive rakeback offers
<-- My first affiliate site. Thoughts and comments more than welcome!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 22-06-08
Registered User
 
Join Date: Oct 2007
Posts: 428
Thanks: 0
Thanked 4 Times in 4 Posts
philhancox is an unknown quantity at this point
  Re: Obtaining page ID from WP 2.5.1

Is it not still
PHP Code:
<?php the_ID();?>
?
__________________
Affiliate manager for TheRetailFactory | Discount Codes | Noob-in-training
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 22-06-08
Registered User
 
Join Date: Jun 2007
Posts: 245
Thanks: 0
Thanked 0 Times in 0 Posts
MortimerJazz is an unknown quantity at this point
  Re: Obtaining page ID from WP 2.5.1

Well previous versions of WP, had the ID of each page in the Dashboard.

It doesn't seem to show it now, which obviously means I can't stick it in the PHP.
__________________
PKRPoker3D.com - Bonus codes and exclusive rakeback offers
<-- My first affiliate site. Thoughts and comments more than welcome!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 22-06-08
Registered User
 
Join Date: Oct 2007
Posts: 428
Thanks: 0
Thanked 4 Times in 4 Posts
philhancox is an unknown quantity at this point
  Re: Obtaining page ID from WP 2.5.1

Oh right I understand, yeah that bothered me too. I have to just roll over the post title istelf in the dashboard and it comes up with something like http://www.mydomain.co.uk/wp-admin/p...on=edit&post=9
and grab the post number that way, which is a step backwards really.
__________________
Affiliate manager for TheRetailFactory | Discount Codes | Noob-in-training
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 22-06-08
Registered User
 
Join Date: Apr 2008
Location: Essex UK
Posts: 53
Thanks: 0
Thanked 0 Times in 0 Posts
DannyW is an unknown quantity at this point
  Re: Obtaining page ID from WP 2.5.1

Quote:
Originally Posted by MortimerJazz View Post
Well previous versions of WP, had the ID of each page in the Dashboard.

It doesn't seem to show it now, which obviously means I can't stick it in the PHP.
They're not logged anywhere in the admin section of 2.5*. What I've had to do was alter the permalinks back to default (?p=123), run through the posts/pages and jot all of them down, then flick it back to the /%postname%/ option. Now I keep a post ID list from when I write the page/post.

It won't harm to change the permalinks for a few mins to do this and WordPress will auto redirect whilst you're doing this. Just remember to change them back as soon as you're done.

Hope that helps, it's the only way I could find to do it.

EDIT:

(Phil posted this while I was posting)

Quote:
Originally Posted by philhancox View Post
Oh right I understand, yeah that bothered me too. I have to just roll over the post title istelf in the dashboard and it comes up with something like http://www.mydomain.co.uk/wp-admin/p...on=edit&post=9
and grab the post number that way, which is a step backwards really.
That's a better way to do it, never noticed that! Forget what I said above!
__________________
Voucher Codes

Last edited by DannyW; 22-06-08 at 04:47 PM. Reason: add more to post
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 23-06-08
Registered User
 
Join Date: Nov 2004
Location: Wirral, Merseyside
Posts: 1,008
Thanks: 4
Thanked 4 Times in 2 Posts
gadget is an unknown quantity at this point
  Re: Obtaining page ID from WP 2.5.1

If I'm reading this right, you're after the page ID that's assigned when you first list/load a page.

I had the same issue when trying to locate category IDs. I ended up going into the MySQL control panel and finfing them there.

Before you go pale, no 'MySQL' was needed - lol!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 23-06-08
Registered User
 
Join Date: Nov 2004
Location: Wirral, Merseyside
Posts: 1,008
Thanks: 4
Thanked 4 Times in 2 Posts
gadget is an unknown quantity at this point
  Re: Obtaining page ID from WP 2.5.1

Quote:
Originally Posted by philhancox View Post
Oh right I understand, yeah that bothered me too. I have to just roll over the post title istelf in the dashboard and it comes up with something like http://www.mydomain.co.uk/wp-admin/p...on=edit&post=9
and grab the post number that way, which is a step backwards really.

That doesn't work for me. All I get is .. Edit "page/post name" ..

I use IE7.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 23-06-08
Registered User
 
Join Date: Apr 2008
Location: Essex UK
Posts: 53
Thanks: 0
Thanked 0 Times in 0 Posts
DannyW is an unknown quantity at this point
  Re: Obtaining page ID from WP 2.5.1

Quote:
Originally Posted by gadget View Post
That doesn't work for me. All I get is .. Edit "page/post name" ..

I use IE7.
Take a look at the bottom left of your browser when mousing over.
__________________
Voucher Codes
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 23-06-08
Registered User
 
Join Date: Nov 2004
Location: Wirral, Merseyside
Posts: 1,008
Thanks: 4
Thanked 4 Times in 2 Posts
gadget is an unknown quantity at this point
  Re: Obtaining page ID from WP 2.5.1

Danny - you are so right. Thank you - reputation point added!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 23-06-08
Registered User
 
Join Date: Oct 2007
Posts: 428
Thanks: 0
Thanked 4 Times in 4 Posts
philhancox is an unknown quantity at this point
  Re: Obtaining page ID from WP 2.5.1

Quote:
Originally Posted by gadget View Post
Danny - you are so right. Thank you - reputation point added!
Do I not get one? I said to rollover the link, just didn't mention looking at the browser frame!
__________________
Affiliate manager for TheRetailFactory | Discount Codes | Noob-in-training
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #11 (permalink)  
Old 23-06-08
Registered User
 
Join Date: Apr 2008
Location: Essex UK
Posts: 53
Thanks: 0
Thanked 0 Times in 0 Posts
DannyW is an unknown quantity at this point
  Re: Obtaining page ID from WP 2.5.1

Quote:
Originally Posted by philhancox View Post
Do I not get one? I said to rollover the link, just didn't mention looking at the browser frame!