In this lab, you and I are going to add a subtitle to the posts. How would you do that? Where would you start?
Let’s start by giving the means for the site owner or author to input the subtitle in the WordPress Post Edit interface (in the back-end). There are 2 strategies here:
- Use the built-in interface that ships with WordPress
- Build a custom meta box
In this lab, we’ll use the built-in interface. Why? I want you to focus on the database and WordPress functions that interact with the database. Then in the next lab, you’ll work on how to build a custom interface to get, update, delete, and add new post metadata (custom fields).
You get WET when you swim. Stay DRY when you code.
Total Lab Runtime: 02:03:31
- 1 Lab Introductionfree 09:52
- 2 What is a Custom Field?free 15:55
- 3 What is a Meta Box?free 06:24
- 4 Project: Add a Subtitlepro 07:16
- 5 The Databasepro 11:48
- 6 Get Subtitle Post Metadatapro 15:26
- 7 Add Subtitle to Genesis Themepro 12:19
- 8 Update an Existing Custom Fieldpro 17:15
- 9 Add a New Custom Fieldpro 07:19
- 10 Delete a Custom Fieldpro 10:13
- 11 More Custom Field Functionspro 06:25
- 12 Wrap it Upfree 03:19