In the last episode, you built a function to handle grabbing all of the post’s post type features. But what if you don’t want all of them? It would be nice to make our new function more reusable by passing in features to exclude.
In this episode, you’ll extend your new function by adding the exclude option. We want to exclude trackbacks, comments, excerpts, and custom fields features.
You can follow along in WordPress codex.
You will use the following PHP and WordPress Core functions:
Hey... hey you... yes you!... Having a good time? Learning new things? Good!
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