You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a df_menu_item_taxonomy taxonomy which is hierarchical (can contain nested categories)
For a divi module field of type categories I want to only show the parent (parent = 0) categories. Currently it shows all the categories including nested categories.
Create a category say "Wine" and a nested category say "Red Wine"
Create few custom post type entries and assign them both the above categories.
Create a divi module and add the following field $fields['include_categories'] = [ 'label' => esc_html__('Include from only these categories', 'et_builder'), 'type' => 'categories', 'renderer_options' => [ 'use_terms' => true, 'term_name' => 'df_menu_item_taxonomy', ], 'tab_slug' => 'general', 'toggle_slug' => 'data', ];
On the frontend visual builder add the created divi module.
The categories checkbox list will have "Wine" and "Red Wine"
I want to show only the parent categories "Wine"
Screenshot and/or gif
Sample screenshots attached.
Nested category screenshot
Divi module field with nested categories item
The text was updated successfully, but these errors were encountered:
I'm stuck at this. Is there any work around for this?
As multiple_checkboxes don't support dynamic options and custom controls are not yet supported in Divi! Referring #40
Greetings,
Problem Description
I have a
df_menu_item_taxonomy
taxonomy which is hierarchical (can contain nested categories)For a divi module field of type
categories
I want to only show the parent (parent = 0) categories. Currently it shows all the categories including nested categories.$fields['include_categories'] = [ 'label' => esc_html__('Include from only these categories', 'et_builder'), 'type' => 'categories', 'renderer_options' => [ 'use_terms' => true, 'term_name' => 'df_menu_item_taxonomy', ], 'tab_slug' => 'general', 'toggle_slug' => 'data', ];
The
renderer_options
array should be capable of take further arguments like (parent=0) so that we can have the desired effectSteps To Reproduce
$fields['include_categories'] = [ 'label' => esc_html__('Include from only these categories', 'et_builder'), 'type' => 'categories', 'renderer_options' => [ 'use_terms' => true, 'term_name' => 'df_menu_item_taxonomy', ], 'tab_slug' => 'general', 'toggle_slug' => 'data', ];
I want to show only the parent categories "Wine"
Screenshot and/or gif
Sample screenshots attached.
Nested category screenshot
Divi module field with nested categories item
The text was updated successfully, but these errors were encountered: