Skip Navigation

[Resolved] Empty content of user fields?

This support ticket is created 6 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.

Our next available supporter will start replying to tickets in about 2.44 hours from now. Thank you for your understanding.

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

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 3 replies, has 2 voices.

Last updated by Shane 6 years, 6 months ago.

Assisted by: Shane.

Author
Posts
#905018

I have created a bunch of user fields using WP Toolset and now I need a way to empty the content of these fields without deleting the actual fields as I still need them. Is there a simple way to do this?

#905127

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Nevil,

Thank you for contacting our support forum.

You are referring to deleting the data of each user that is stored within these fields correct?

Please let me know.

Thanks,
Shane

#905369

Hi Shane,
Yes, I need to delete the values stored in the fields, but not the fields themselves.
The fields are used on more than 2.000 pages, so doing it manually is not an option 😉
Thanks,
Nevil

#905619

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Nevil,

Then the only way this is possible is to use an SQL query.

Here is an example below.

DELETE FROM `wp_usermeta` WHERE `meta_key` = 'wpcf-single-line'
</code

This is done directly on the database. So what you need to do is replace the wpcf-single-line with the meta key of your custom field.

Please let me know if this helps.

Thanks,
Shane