Skip Navigation

[Resolved] How can I update lots of these posts at once?

This support ticket is created 3 years, 6 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)

This topic contains 1 reply, has 2 voices.

Last updated by Luo Yang 3 years, 6 months ago.

Assisted by: Luo Yang.

Author
Posts
#2059293

How can I update lots of these posts at once, the above code I used does nothing

#2059323

Hello,

You can follow WP document to setup your custom PHP codes:
https://developer.wordpress.org/reference/functions/wp_update_post/

If you need to trigger it after user submit the Toolset form, please try action hook cred_save_data:
https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data

If you want to update multiple existed posts status, you can try SQL query with mysql tools(phpmyadmin), for example:
https://wordpress.stackexchange.com/questions/245594/bulk-update-of-custom-post-type-post-status-through-sql
Please backup your website database first.