[wp-hackers] Retrieving post id based on the page title
Joost de Valk
joost at yoast.com
Sat Sep 12 11:59:18 UTC 2009
There's a get_page_by_title, modify it to use with posts, in fact, it
should probably be modified within core?
On Sep 12, 2009, at 1:55 PM, Sudar Muthu wrote:
> Hello all,
> I need to know if there is a built-in function (or recommended way) to
> retrieve the post id of a page/post based on the post title, without
> querying the database directly.
> I know it can be done by querying the database, but I prefer to use
> build-in function if available. A quick look into WordPress code,
> reveal any function.
> With Regards,
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers