@ reyes
re: Is this the only way to only show the Parent and not the Child categories?
Yes, the include parameter will limit the drop down to only the categories listed (by ID). This will not affect the actual entries shown. You still would use the category shortcode option for that. I mention that in case it is relevant to what you want to do.
re: What if I only want to show the Parent and Child but not the sub_Child? For example, Federal (parent) Agency (child) Cyber (sub-child) What shortcode would I use?
You would use the depth parameter, setting it to 3, like so:
$atts = array(
'default' => self::$atts['str_select'],
'select_all' => self::$atts['str_select_all'],
'type' => self::$atts['enable_category_multi_select'] ? 'multiselect' : 'select',
'group' => self::$atts['enable_category_group_by_parent'],
'show_count' => self::$atts['show_category_count'],
'show_empty' => self::$atts['show_empty_categories'],
'parent_id' => self::$atts['enable_category_by_root_parent'] ? self::$atts['category'] : array(),
'exclude' => self::$atts['exclude_category'],
'depth' => 3,
);
Again, this will only affect the drop down, not the entries listed. Also, you can not use this together with the include parameter because when you use include you are “cherry picking” select categories from the hierarchy so the depth will not apply.
Hope that answers your questions.
