Title: Delete automatically posts
Last modified: August 19, 2016

---

# Delete automatically posts

 *  Resolved [Bootje](https://wordpress.org/support/users/bootje/)
 * (@bootje)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/delete-automatically-posts/)
 * I’m writing a plugin and I need to delete posts after a certain time. How is 
   the best way to check the date of the post. I was first thinking to put function
   in the wp_footer hook, but the check is done thousands of times a day (depending
   on pageviews) and is not really the way to do it.
 * I’m still learning to write plugins, so I hope someone can consult me!

Viewing 1 replies (of 1 total)

 *  Thread Starter [Bootje](https://wordpress.org/support/users/bootje/)
 * (@bootje)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/delete-automatically-posts/#post-1403824)
 * Found it myself: [http://codex.wordpress.org/Function_Reference/wp_schedule_event](http://codex.wordpress.org/Function_Reference/wp_schedule_event)

Viewing 1 replies (of 1 total)

The topic ‘Delete automatically posts’ is closed to new replies.

 * 1 reply
 * 1 participant
 * Last reply from: [Bootje](https://wordpress.org/support/users/bootje/)
 * Last activity: [16 years, 3 months ago](https://wordpress.org/support/topic/delete-automatically-posts/#post-1403824)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
