The PHP code in this tutorial enables you to create both a new custom post type and add support for the simple creation of unlimited CPT taxonomy types.
The reason i have written this post is because i was asked a question about how to add taxonomy types to CPT’s in Divi and because i have also created a basic child theme to use for storing custom code for the Divi by Elegant Themes.
The code adds 3 pages:
- The 1st page lists all your single pages you create using your new custom post type.
- The 2nd page enables you to create each single CPT in the same way you create a page or post.
- The 3rd page enables you to easily create custom taxonomy types which are like categories for your CPT.
Here’s what the 3rd page looks like showing the new menu items added in the left sidebar for the first 2 pages.
CPT & Taxonomy Code
Installation of the code couldn’t be easier if you have a child theme for Divi already installed.
Please copy ALL the code from the view raw link in the Gist and paste it at the end of your child themes functions.php file using a text editor like Notepad++
More customization tutorials for Divi coming soon.
Leave a Reply
You must be logged in to post a comment.