Add Custom Post Type With Taxonomy Type Settings Page To Divi Theme

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:

  1. The 1st page lists all your single pages you create using your new custom post type.
  2. The 2nd page enables you to create each single CPT in the same way you create a page or post.
  3. 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.

Taxonomy Types

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.


Comments

6 responses to “Add Custom Post Type With Taxonomy Type Settings Page To Divi Theme”

  1. John Hillcoat Avatar
    John Hillcoat

    Hi Brad,

    I have been following your various tips, particularly for Genesis, for quite a while now. You present some really useful stuff.

    I have noticed that you are working with the Divi theme and bought myself a licence to try it out. I really am enjoying how it builds pages. But I am struggling with the wraps and header. For example, it would be good to have a header where the contact details or other information could be displayed to the right of the logo – like having a header right widget area in Genesis. Is there a way to do this?

    Thanks,

    John

    1. Brad Dalton Avatar
      Brad Dalton

      Yes. If you look in Genesis, there’s a fair amount of coding to do that as well as CSS and Media Queries.

      You could hard code it into a copy of the header.php file or create a new file for the widget and use get_template_part() or a template tag.

      Would require advanced coding skills.

      Happy to code this for you if you want to hire me.

  2. Al H. Avatar

    Thanks Brad! Following your Divi tutorials so far. Got your current child theme as well.

    Quick question, is it possible to enable the Divi Buiider on the custom post type similar to the Projects CPT?

    Appreciate the amazing tutorials and guidance.

    1. Brad Dalton Avatar
      Brad Dalton

      Hello Al

      I’m new to Divi so will need to work this out myself. Thanks for letting me know about Divi Builder.

      Stay tuned.

      1. Al H. Avatar

        Thanks Brad! The Divi Builder is extremely powerful (with a few short falls like any solution though like front end editing) – I’ve used all types of builders (Visual Composer, Themify Builder, Aqua Page Builder) and have to say, the folks at Elegant Themes have done a phenomenal job implementing complex layouts and designs with ability to import and export layouts on the fly.

        Again, I’m thrilled to see that you’ve taken an interest in the Divi 2.0 theme and eager to see what clever tips are on their way from you 🙂 .

        1. Brad Dalton Avatar
          Brad Dalton

          Thanks for the feedback on the Divi builder.

          Can’t wait to give it a shot.

Leave a Reply

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.