Skip Navigation

[Resolved] Bulk delete custom posts from the front end

This support ticket is created 4 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Luo Yang 4 years, 9 months ago.

Assisted by: Luo Yang.

Author
Posts
#1749279

I am building a survey site with several custom post types each of them being a different survey.

From time to time I need to empty survey results to start a new survey, so I need to remove completely all the posts created during the last survey.

Is there any way to do this from the front end?

Thank you for your assistance.

#1753367

Hello,

There isn't such kind of built-in feature within Toolset plugins, one delete post link can handle one post at the same time, in your case, you might consider custom codes, for example:
Query those posts you want to remove, and delete/trash them with wordpress functions.

More help:
https://developer.wordpress.org/reference/classes/wp_query/
https://developer.wordpress.org/reference/functions/wp_trash_post/