Content of the page

Bulk edit of serialized (jsoned) wordpress posts meta data


Content of the article

Data editing tools realized as popup with textinputs where are keys and values. There is 2 types of serialized meta data with which WPBE can work:

  • array - where data is presented as:  key->value AND key->array(key1->value1, key2->value2, key2->value2)
  • object - where data is presented as: key->{key1->value1, key2->value2, key2->value2}

ATTENTION: Do not mix array type and object type structure on the same popup! Also be sure that data order changing will not break logic of the plugin which works with that data.

Shortly algorithm is the next:

  • on the any one single post back-end set meta data as you always did it and save
  • go to WPBE plugin page and include that meta key in tab Meta Fields using field 'Get meta keys from any post by its ID'
  • set for meta key you need type 'array' and then press Save button
  • after page reloading in tab Settings find and enable column of that new meta key and press Save data button
  • after page reloading you will see in the Posts Editor tab column of that new meta field
  • you have 2 ways to bulk edit data there:
    • use 'binded editing' - select posts on the same page of Posts Editor, enable switcher 'binded editing', click on button 'Array' in the column of the post which you prepared as an example, edit data in popup if you need it or instantly click on 'Apply' button of the popup and wait until operation finished
    • use tab 'Bulk Edit' on the screen top - use posts filtering if you need it or use checkboxes for selection, or make bulk edit operation to all posts of your shop
    • click on button 'Array' in that column of the post which you prepared as an example, go to tab Bulk Edit and check that new meta field there, click on button of that meta field to see & set data, click 'Apply' button of the popup, click on button 'Do Bulk Edit' and wait until operation finished
    • after bulk operations you can set individual data for each post if you necessary directly in the Posts Editor tab using button 'Array' for each post