I need to use an array of existing categories as a dropdown option value then use the selected category ID. More exactly, I try to make a custom module to display the latest posts form selected category using Visual Composer plugin tutorial.
I tried to use wp_dropdown_categories
in the follwoing code but I get some errors and nothing works:
array(
'param_name' => 'category_id',
'type' => 'dropdown',
'value' => wp_dropdown_categories, // here I'm stuck
'heading' => __('Category filter:', 'overmax'),
'description' => '',
'holder' => 'div',
'class' => ''
),
Thanks