Hi waqar, good day. Happy new year!
I have this idea to create a global function to replace all the empty fields with an "update" button,
I am currently using shortcode "update-button" for this purpose, it works just that I need to edit "all" all my templates codes to add this,
is there anything can be done? this could be useful as the main toolset settings option too.
Hi Dee,
Thanks for asking and I wish you a wonderful new year ahead.
Due to a variation in field types, content items, and project requirements etc, bulk editing is something that is left for website admins to implement, on a case to case basis.
But we always welcome and encourage new feature requests and you can submit this directly to the product management team, through the form at:
https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/
To create a custom code or shortcode that can update/add custom field values in bulk, you can use "get_posts" function ( ref: https://codex.wordpress.org/Template_Tags/get_posts ) to cycle through your desired post types and then use "get_post_custom" function ( ref: https://codex.wordpress.org/Function_Reference/get_post_custom ) to cycle through all the custom field values attached to individual post.
To perform the update operation on an empty custom field value you can use "update_post_meta" function ( ref: https://codex.wordpress.org/Function_Reference/update_post_meta ).
I hope this helps!
regards,
Waqar
My issue is resolved now. Thank you!