In earlier tutorial, I cover all about the page builder design, and how to make all the control works (create, delete, and reorder rows). In this post I want to explain how I structure the data and save it as custom fields. Specially in how to update the row order number so we can properly save each rows data. Download example plugin to follow tutorial easier: Let’s make this very simple. We are going to save all this data as single post meta (custom field) with meta key “fxpb“. And we are going to save page builder data as multidimensional array. Here’s the example of the data structure: 'type'=>'col-1', 'type'=>'col-2', 'content-1'=>'1st Col Content...', 'content-2'=>'2nd Col Content, Lorem Ipsum...', And here’s the screenshot of the page builder with the above data: So, the simple explanation: We stored the data in post meta with meta key “fxpb“. We save each row data as array with the keys (“1″,”2″,”3”) as the order of the row/row position. (1st level of the array) each or rows are array containing each rows data such as rows type and content. (2nd level of the array) To save this page builder
Share This