To delete a custom field from your product pages, you have a couple of options depending on how the field was originally added.
If the custom field was added using the Advanced Custom Fields (ACF) plugin, follow these steps:
- Remove the Display Code:
- Locate the code in your theme files that displays the custom field on the product pages.
- Delete or comment out the code related to the custom field. This could be something like
get_field('my_field')
orthe_field('my_field')
2.
- Use ACF Extended (Optional):
- If you have ACF Extended installed, you can use its Developer Mode to delete the custom field from all products.
- Enable Developer Mode and then edit a product, scroll down to the “Custom Fields” metabox, and click “Delete”.
- Manually Remove from Database (Not Recommended):
- As a last resort, if you want to completely remove the custom field data from your database, you can manually delete the
post_meta
entries associated with the custom field using phpMyAdmin or another database management tool. However, this is generally not recommended unless you are comfortable with managing databases.
- As a last resort, if you want to completely remove the custom field data from your database, you can manually delete the
If the custom field was added using the WooCommerce Extra Product Options plugin, you can follow these steps to delete it:
- Go to the Extra Product Options Page:
- Navigate to
WooCommerce
→Extra Product Option
→Extra Product Fields
in your WordPress admin dashboard.
- Navigate to
- Select the Fields to Delete:
- Use checkboxes to select the fields you want to delete.
- Remove the Fields:
- Click on the
Remove
button from the action bar to delete the selected fields 3.
- Click on the
- Confirm the Deletion:
- Confirm the deletion by clicking the
Save changes
button.
- Confirm the deletion by clicking the
After deleting the custom field, make sure to test your product pages to ensure the field has been removed successfully.
Upgrade to our Managed WordPress Hosting Plans, Get a full-featured online store with fast, simple setup and enjoy unlimited storage and visits per month. Our plans come with robust protection, including 1-click restoration, automatic daily malware scans, and unlimited malware removal and hack repair. SEO optimization and SSL certificates ensure your site is secure and easily discoverable. Plus, you’ll get a 1-click testing site and a full-featured online store with a fast, simple setup. With our plans, you’re not just getting a website. Explore our Managed WordPress Hosting Plans now!
WordPress F.A.Q articles
- How to use the WordPress Customizer effectively?
- How does the Customizer handle changes to the website’s code or structure?
- What is the WordPress Customizer?
- How can I ensure that my custom fields are properly formatted and validated?
- What are some other popular plugins for adding custom fields in WordPress?