[wp-hackers] get_posts() alternative for all posts, published and unpublished

Callum Macdonald lists.automattic.com at callum-macdonald.com
Mon Mar 5 01:08:57 GMT 2007


I'm writing a plugin that updates a custom field on all posts in a given 
category, both published and unpublished posts, with past or future 
dates. I can't find a way to get the get_posts() function to retrieve 
posts that don't currently appear on the blog. That makes sense given 
that get_posts() is a template function.

I can't find an alternative function, nor can I figure out where 
wp-admin/edit.php gets the list of posts. I figure it could be the wp() 
function, but I can't find any documentation on the codex (probably on 
account of how often the letters wp are used).

Can anyone suggest how to approach this?



More information about the wp-hackers mailing list