[wp-hackers] Finding post ID while in header
Andy Skelton
skeltoac at gmail.com
Tue Mar 21 20:31:05 GMT 2006
On 3/21/06, Andy Skelton <skeltoac at gmail.com> wrote:
> On 3/21/06, CaptSolo <captsolo at gmail.com> wrote:
> > Hi!
> >
> > Could you suggest how to find out what the post ID is while in header?
> > E.g., how to display a post ID (if this is a single post page) within
> > HTML comments.
>
> $posts[0] should have what you're looking for.
Don't we have API for this stuff? Something like get_queried_object()?
When was that introduced? I've fallen into Trunk and I can't get out.
More information about the wp-hackers
mailing list