Hi Guys !. I created a shortcode visual composer get post by custom taxonomy. But when I get all custom taxonomy (for dropdown category on visual backend editor) it not working.
my code:
$args1= array(
‘taxonomy’ => ‘danh_muc’, // my custom taxonomy
‘hide_empty’ => 0,
);
$inra=array();
$danhmucs= get_terms($args1);
foreach ($danhmucs as $danhmuc) {
$tendm=$danhmuc-> name;
$iddm=$danhmuc-> term_id;
$inra[$tendm]=$iddm; }
vc_map( array(
“name” => __(“News”, ‘understrap’),
“base” => “tintuc”,
“class” => “”,
“category” => ‘Content’,
“icon” => “icon-wpb-application-icon-large”,
“params” => array(
array(
“type” => “dropdown”,
“holder” => “div”,
“class” => “”,
“heading” => “Danh m?c”,
“param_name” => “cat”,
“value” => $inra,
“description” => ‘Ch?n danh m?c B?S c?n hi?n bài ??ng’,
),
)
));
But When I change ‘taxonomy’ => ‘danh_muc’ to ‘taxonomy’ => ‘category’ it working fine !
I var_dump careful $inra with 2 cases: ‘taxonomy’ => ‘danh_muc’ and ‘taxonomy’ => ‘category’, The results are the same
Thanks all !
https://vc.wpbakery.com/features/support/
Commercial products are not supported in these forums. As you are their customer I am sure they will have no problem supporting you there.
]]>