A meta box provides an interface for site owners, author, editors, admins, etc.
to view, add, delete, and edit custom fields (post metadata). In this hands-on coding lab, you will create a meta box from scratch, step-by-step as you learn about the process of building your own meta box interfaces from scratch.
There are 4 necessary components to adding a custom meta box to WordPress:
- Add/Register
- Render
- View File
- Save
In this hands-on coding lab, you will explore each of them as you build a meta box for your subtitle custom field (post metadata).
Prerequisites
In order to do this hands-on, you will need to complete the first part of this series:
Hey... hey you... yes you!... Having a good time? Learning new things? Good!
Episodes
Total Lab Runtime: 02:21:18
- 1 Lab Introductionfree 07:20
- 2 What is a Meta Box?free 07:28
- 3 Add a New Meta Boxpro 11:46
- 4 Meta Box HTMLpro 18:39
- 5 Save Process & $_POSTfree 12:33
- 6 Bail Out if Not Our Meta Boxpro 05:03
- 7 Nonce Security Checkpro 10:16
- 8 On Save - Update or Delete Custom Field?pro 12:03
- 9 Validate & Sanitize BEFORE Updating Databasefree 14:41
- 10 Add Another Custom Fieldpro 08:49
- 11 Making Save Easier with $_POST Keypro 05:32
- 12 Better Saving Strategy for Multiple Custom Fieldspro 14:47
- 13 Changing Where Meta Box Appearspro 06:02
- 14 Passing Arguments to Renderpro 02:18
- 15 Wrap & Making it Reusablepro 04:01