limuelzoleta / custom-post-type-divi-module-ext

A WordPress plugin for extending Divi Builder's custom modules that enable the user to post a custom post type using the Blog Module template
GNU General Public License v2.0
14 stars 9 forks source link

Categories is listing Post Categories #4

Open jan1980 opened 6 years ago

jan1980 commented 6 years ago

I was expecting to see the Custom Post Type specific categories but it's showing the Posts ones... any way to correct it? Thanks a lot for the plugin by the way.

jkane08 commented 5 years ago

also looking for solution to same issue

beunoit commented 5 years ago

I'm trying to find a solution too...!

beunoit commented 5 years ago

I did it by modifying jlrz-divi-custom-post-types.php file, but it's not "clean" and it works only for my taxonomy_name... I paste it here if it helps, but it should be done for "universal" cases.

2 steps :

  1. In function get_fields, I added : 'taxonomy_name' => 'your_taxonomy_slug', after line 267
  2. And for rendering, I added :

$filter_categories = self::filter_invalid_term_ids( explode( ',', $include_categories ), 'categories_videos' ); if ( ! empty( $filter_categories ) ) { $args['tax_query'] = array( array( 'taxonomy' => 'your_taxonomy_slug', 'field' => 'id', 'terms' => $filter_categories, 'operator' => 'IN', ) ); }

before line 1059 for include it in the query.

limuelzoleta commented 5 years ago

Thank you for raising an issue about this. I do apologize for the delay of my response due to busy schedule but see to it that I will make an update soon to make this code up to date and probably add more modules to it. If you have suggestions feel free to hit me up!