• Resolved wy4tt34rp

    (@ratputin)


    I have used CPTUI to add 3 custom post types to my site. Each post type has individual taxonomies. I have added the taxonomies, set Hierarchical to “True”, and attached them to the specific post type.

    For example: I have a post type named “Solutions”. It has a taxonomy of “Solutions Categories” with two children named “Case” and “Event”.

    What I am attempting to do is use the Divi Blog module to display the taxonomy “Case” on a page, but not “Events”.

    “Solutions” is available in the Divi Module settings, but not the “Solutions” taxonomies are not.

    Is this possible? Did I miss something?

    Any help is much appreciated.

    • This topic was modified 4 years, 6 months ago by wy4tt34rp.
Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Not that I’m aware of, we don’t have any fields/settings that are directly related to Divi. The only part of Divi support in CPTUI-Extended if you’ve seen that product, is getting the Divi Builder support enabled for the post types themselves.

    Questions around their Blog Module would probably be better off for Divi support technicians. I’m not immediately familiar with how it handles itself.

    Thread Starter wy4tt34rp

    (@ratputin)

    Thank you for the quick response!

    I was afraid you’d say that, but I wanted to be sure that I had not missed something with the CPT setup that would “trigger” Divi to recognized the Custom Post “Categories”.

    TY!
    KO

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    None that I’m aware of, at least. Hope they can help get this figured out with you.

    Any updates on this? I also would like to display a single category from a CPT on a page.

    Hi !
    I was needing the same thing and I made this “patch”.
    Copy this theme file in your child theme : /wp-content/themes/YOURTHEME/includes/builder/module/Blog.php
    and delete the line 3 : “require_once ‘helpers/Overlay.php’;”
    -> Then use this guide to override a Divi module :
    https://github.com/eduard-ungureanu/Divi-tuts/wiki/How-to-customize-the-PHP-code-of-any-Divi-Module

    And add after line 1494 :

    <?php // Print custom taxo
    $customtaxo = wp_get_post_terms( $post->ID, 'YOUR_TAXO_SLUG', array( 'fields' => 'all' ) );
    if(!empty($customtaxo )) {
       foreach($customtaxo as $t) {
         echo "<p lass=\"term-$t->term_id\">". $t->name . "</p>";
       }
    }
    ?>

    This is not a very good work, but it works !

    • This reply was modified 4 years, 2 months ago by beunoit.

    Hi! Thanks for the patch @beunoit !!

    I’ve created a custom blog module and I’m loading it. But around line 1494 can’t find the right place to insert your code. It’s looks like some frontend code.

    Thanks in advance!!

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    If anything, the code above is useful to output the terms from a given taxonomy, that are associated with a given post.

    Sorry! I thought that I’d able to filter through that terms and show what I’d select.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    No worries from my end at least.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Add Custom Post Type Taxonomy to Divi Blog Module’ is closed to new replies.