Hope you can point me in the right direction, with a plugin or function. With "Contact Form 7" logged in users post their info with "Form to Post" plugin. Everything is front end. It is a big form that uses custom fields to display posts. I need a way to automatically delete posts, so every time a new post by user is created the last one is deleted in that category. I found a way I can do it by date, by that will not work. Thanks.
If i understand the question correctly, you want that whenever a user adds a new post, all his/her previous posts should be deleted. I wonder why would you do that!! :) But anyway, you can use this code.
You might want to change the user role though, according to ur requirement