Learn how to add custom fields to CMB2.
- [Instructor] The code we wrote in the previous movie…creates a new post meta field for each task…that has the task status set to either true or false…depending on whether or not the task is completed.…The problem is this information is currently…only available in the database.…You cannot see it on the back end of WordPress,…and you also can't access it through the rest API.…That needs to change.…If we go to any task right now and fill it out,…save it or update it, you'll notice that…nowhere in this display is the task status displayed.…
What we want is for the task status…to be displayed inside this Task Book Data area,…so at the very bottom, it should say Task Status,…and then either In Progress or Completed.…But this should not be an input field,…because the status is controlled by…the function we created previously.…You'll remember that this section was controlled…by this file, CMB2-functions.php.…Scrolling down a bit, here we set up the section itself,…Task Book Data, and then below, we add a bunch of fields,…
- Planning the application
- Extending WordPress with a plugin
- Setting up the standalone application
- Configuring OAuth 2 in WordPress
- Building the task list view
- Building the new task view
- Creating a new task via the REST API
- Displaying conditional content
- Visualizing data using Graph.js
Skill Level Advanced
1. Plan the Application
2. Extend WordPress with a Plugin
3. Set Up the Standalone Application
Review of user flow2m 34s
4. Build the Task List View
5. Build the New Task View
6. Build the Update/View Task View
7. Bonus Features
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.