WordPress gives you the means to add new post types. In this hands-on lab, you will explore configuring and registering a new custom post type. You are actively building a team biography plugin, where team members are displayed on a business-centric website.
You are going to be amazed at how easy it is to configure and register your own custom post types. When your project needs a portfolio, event, FAQ, glossary, team bios, or whatever special content classification, you will know the ins and outs of how to add these to your project.
What You Will Learn
In this lab you will learn:
- What a “Custom” post type is
- How easy it is to register a new one with a couple lines of code
- How and Why to configure the labels to make the back-end interface specific for this new post type
- Configuring support features including how to include features that you may not know about at build time
- The why and how of flushing the rewrite rules
- Best practices for flushing the rewrite rules
- A basic overview of the configurable arguments
Prerequisites
In order to do this lab, you will need your local sandbox site spun up and ready to go. See this Help Center article to get your sandbox ready.
We highly recommend that you complete this lab first:
You may want to read this article either before or after you take this lab:
Break. Go rest your noodle for a couple of minutes.
Episodes
Total Lab Runtime: 01:20:49
- 1 Lab Introductionfree 02:33
- 2 What is a Custom Post Type?free 03:12
- 3 Plugin Overviewpro 12:09
- 4 Minimum Configurationpro 07:18
- 5 Configure Labelspro 12:52
- 6 Configure Post Type Featurespro 07:21
- 7 Exclude Post Type Featurespro 08:25
- 8 Flush Rewrite Rulespro 13:44
- 9 Configuring Argumentspro 10:48
- 10 Wrap it Uppro 02:27