[wp-hackers] Post Id Question

Chris Davis chrisdmitri at gmail.com
Mon Apr 4 15:20:11 GMT 2005


Seriously, use $post->ID that is the fastest way to grab that.

On Apr 4, 2005 11:17 AM, Kimmo Suominen <kim at tac.nyc.ny.us> wrote:
> On Mon, Apr 04, 2005 at 11:14:40AM -0400, Ryan Duff wrote:
> > Bill Smith wrote:
> > >I have a filter for "the_content". Inside the filter function, I need
> > >the post id. What is the best way to obtain it?
> >
> > $post_id = the_ID();
> 
> Wouldn't you need to use ob_start etc. around the_ID() ?
> 
> Regards,
> + Kim
> --
> <A HREF="http://kimmo.suominen.com/">Kimmo Suominen</A>
> 
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list