How do I access vc_map() internal values to create custom markup for WPBakery interface?

痞子三分冷 提交于 2020-02-05 03:30:31

问题


A similar question has been asked here, without any viable responses: Visual Composer custom markup for custom shortcode (vc_map)

and here: Visual Composer custom shortcode template - custom_markup display user input

I am trying to create custom markup within the WPBakery interface.

I can add custom markup no problem by doing:

$markup = 'test'; 
vc_map( array(
   "name" => __("MyShortcode"),
   "base" => "myshortcode",
   "category" => __('Content'),
   "custom_markup" => $markup, // @TODO how do we access shortcode's attributes here to display in bakery grid
   "params" => $params
) );

This will output "test" in the WPBakery grid which is good, but how do I access vc_map() internal values to display?

For instance I have "post types" as a field for this shortcode. If someone selects "page" post type for example, I would like to display those posts within the WPBakery grid. What I cannot figure out is how to get the values that the user selected to display.

Any help would be greatly appreciated. I've searched endlessly on this one.

来源:https://stackoverflow.com/questions/59933956/how-do-i-access-vc-map-internal-values-to-create-custom-markup-for-wpbakery-in

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!