Accessing posts in the trash from PHP
-
Hi all, (my first post)
I am trying to access posts from PHP that are in the trash. I know I can return content of a trashed post when I know the ID of the post, as I can use:
$post = get_post($id); echo $post->post_title;
after issuing a:
wp_delete_post($id);
but I’d like to be able to produce a list of trashed items for use in my site. Can anyone point me in the right direction? Ideally there’ll be some metadata that I can pull that I don’t know about yet, and that my google searches are failing to uncover! I’m effectively trying to select all posts in the trash for a particular author.
Thanks all!
R
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Accessing posts in the trash from PHP’ is closed to new replies.