Learn how to make custom taxonomies available from the REST API.
- [Instructor] Just like with custom post types,…custom taxonomies can also be registered in the REST API…so they have their own routes.…And just like in custom post types,…we have three new arguments we can add to custom taxonomies.…They are show_in_rest, rest_base, and rest_controller_class.…They work exactly the same way…as they do with custom post types.…So, if we want our taxonomy to be available…through the REST API, we grab the show_in_rest argument,…add it to the arguments array…for the current post type we're working with,…in this case the product types argument,…put in show_in_rest equals true.…
And just like with a custom post type,…if you want to change the rest_base…for the custom taxonomy,…you can do so by setting up the rest_base argument.…
- What are WordPress custom post types and taxonomies
- Creating and testing the plugin
- Creating posts with custom post types
- Building basic custom taxonomies
- Creating custom post type templates
- Including custom post types in the front page index
Skill Level Advanced
Q: This course was updated on 06/22/2017. What changed?
A: New videos were added that cover the Custom Post Type UI plugin; creating custom taxonomies; exporting and importing custom post types, taxonomies, and settings; and making custom post types and custom taxonomies available from the REST API.
1. Understanding Custom Post Types and Taxonomies
2. Creating a Plugin for Custom Post Types and Taxonomies
3. Creating Custom Post Types
4. Creating Custom Taxonomies
5. Creating Custom Post Type Templates
6. Working with Custom Post Types and Taxonomies
7. Going Further with Custom Post Types
Thank you!1m 35s
8. Tying Custom Post Types and Taxonomies to a theme
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
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.