When working with WordPress sites, sometimes you get confronted with situations when you need to update a handful of custom fields attached to a page or a post.
Custom fields, also known as post meta, are additional information you can attach to a post or a page, giving web developers a whole new level of customisability and flexibility. And that makes WordPress a powerful CMS; you can make virtually any kind of websites however you like it.
Here is an example custom fields, generated by a widely popular Advanced Custom Fields (ACF) plugin:
Now, imagine if you have tens or hundreds of posts where you need to update one of those fields. Wouldn’t it be much easier if you could just bulk update them via CSV export and import?
Custom Fields Bulk Editing Made Easy
This short tutorial demonstrates how you can quickly mass-update custom fields via CSV import and save time. Using Smart SEO Data CSV Import/Export, you can extend it to export custom fields into CSV for bulk editing.
UPDATE: Starting from version 7.6.0, it is now much easier to export additional custom fields for bulk editing. No additional codes required. More from our v7.6.0 announcement.
What you need
- An active Smart SEO Data CSV Import/Export plugin
- Names of custom fields
- FTP access (we’ll add a few lines of code to functions.php)
To export and bulk update custom fields via CSV import
Tell Smart SEO Data CSV Import/Export to export those custom fields you want to bulk edit.
Suppose you have a post type called Class with custom fields like class_type, fees, class_description, etc., just add this to your functions.php file:
Export those custom fields to CSV. Navigate to Smart SEO Data CSV Import/Export to initiate the export (notice I’m only exporting “Class” post type)
Edit the exported CSV file accordingly. Notice the columns class_type, fees, class_description
- Now, head back to Smart SEO Data CSV Import/Export and import your CSV file. You’re done.
Exporting Terms Meta Data to CSV for Bulk Editing
Terms meta data was introduced in WordPress 4.4 that lets you attach additional info for each taxonomy term. Term meta data works like custom fields for posts. So it’s not surprising to see plugins or themes rely on terms meta to store arbitrary info for categories, tags, product categories, etc.
Smart SEO Data CSV Import/Export makes it easy to manage terms meta data. By simply exporting your terms meta data to CSV, you can edit them with spreadsheet and import them back with surprising ease.
In the above example, we’re trying to retrieve both
custom_field_name_2 custom fields attached to a taxonomy. And once you import the CSV, both
custom_field_name_2 columns are parsed and update your taxonomies accordingly.
Wrapping it up
Updating custom fields in bulk should not be that difficult. Save time and use Smart SEO Data CSV Import/Export instead. Not only can you mass update SEO meta data but you can also export all your custom fields for bulk editing.