Learn how to make custom post types and taxonomies added to a theme available through permalinks on theme activation.
- [Instructor] If you think back to when we originally…set up our custom pulse types,…you may remember in the plug in…we added this little function at the bottom called…my rewrite flush.…This function flushes the rewrite rules for WordPress…and allows us to reinitialize the rewrite rules…so we get access to our custom pulse types and taxonomies.…Now that I've moved my functionality over into my theme,…I also need to move this functionality…so all my URLS are rewritten and everything works properly.…First, I'll go to the plug in, pulse types dot php file…and copy the function.…
Then I'll go to my child theme post types dot php file.…Scroll all the way to the bottom.…And add the function in.…And then I need to make a change.…Right now, my rewrite flush runs on the activation hook…for the current plug in.…But this isn't the plug in. This is the theme.…So we'll get rid of this last line of code here.…And instead, add an action.…This action hooks on to after, switch, theme.…
And the action we want to run is the same as before;…
- 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.
WordPress Plugins: Advanced Custom Fieldswith Morten Rand-Hendriksen1h 39m Intermediate
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?
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.