Я создал контейнер в вязком композиторе.Теперь у меня есть элемент обертки и дочери.Оболочка имеет свои собственные настройки, но когда я добавлю ее в передний редактор, настройки поля «Строка» перейдут к настройкам родительского элемента.Как мне переместить настройки моего родителя вправо? введите описание изображения здесь
vc_map(array(
"name" => "Our Teams",
"base" => "our_teams",
'is_container' => true,
"category" => 'Football elements',
"as_parent" => array('only'=>'our_teams_item'),
'class' => 'vc_main-sortable-element',
"content_element" => true,
'js_view' => 'VcColumnView',
"params" => array(
array(
"type" => "textfield",
"holder" => "div",
"class" => "hide_in_vc_editor",
"heading" => esc_html__( "Title Orange Text", "test" ),
"param_name" => "title_or",
"value" => "",
),
array(
"type" => "textfield",
"holder" => "div",
"class" => "hide_in_vc_editor",
"heading" => esc_html__( "Title White Text", "test" ),
"param_name" => "title_wh",
"value" => "",
),
array(
"type" => "textfield",
"holder" => "div",
"class" => "hide_in_vc_editor",
"heading" => esc_html__( "Second Title", "test" ),
"param_name" => "title2",
"value" => "",
),
),
));
vc_map(array(
"name" => "Our Teams Item",
"base" => "our_teams_item",
"as_child" => array('only' => 'our_teams'),
'class'=> 'test-class-find',
"category" => 'Football elements',
"content_element" => true,
'js_view' => 'VcColumnView',
"params" => array(
array(
"type" => "attach_image",
"holder" => "div",
"heading" => esc_html__( "Image", "test" ),
"param_name" => "image",
),
array(
"type" => "textfield",
"holder" => "div",
"heading" => esc_html__( "Slide Number", "test" ),
"param_name" => "num",
"value" => "",
),
array(
"type" => "textfield",
"holder" => "div",
"heading" => esc_html__( "Title", "test" ),
"param_name" => "text1",
"value" => "",
),
array(
"type" => "dropdown",
"heading" => esc_html__( "Icon", "football" ),
"param_name" => "icon",
"value"=> array(
"Cup"=>"icon-signs",
"Helmet" => "icon-sports-4",
"Đ¡lothing" => "icon-fashion",
),
),
array(
"type" => "textfield",
"holder" => "div",
"heading" => esc_html__( "Text", "test" ),
"param_name" => "text2",
"value" => "",
),
array(
"type" => "textfield",
"holder" => "div",
"heading" => esc_html__( "Link", "test" ),
"param_name" => "link",
"value" => "",
),
),
));
if ( class_exists( 'WPBakeryShortCodesContainer' ) ) {
class WPBakeryShortCode_our_teams extends WPBakeryShortCodesContainer {
}
}
if ( class_exists( 'WPBakeryShortCode' ) ) {
class WPBakeryShortCode_Our_Teams_Item extends WPBakeryShortCode {
}
}
add_shortcode('our_teams', 'our_teams');
function our_teams($atts, $content = null, $cont = null)
{
extract(shortcode_atts(array(
'title_or' => '',
'title_wh' => '',
'title2' => ''
) , $atts));
return "<div class=\"block-Teams t-white clearfix\">
<div class=\"container-fluid\">
<div class=\"row\">
<div class=\"col-sm-12\">
<div class=\"t-wrap\">
<h2><span class=\"orange-text\">{$title_or} </span>{$title_wh}</h2>
<h4>{$title2}</h4>
</div>
</div>
<div class=\"col-md-12 col-sm-12 col-xs-12\">
<div class=\"img-block-teams clearfix carousel-wrap-teams owl-carousel owl-theme carousel-default-behavior\">
" . do_shortcode($content) . "
</div> </div>
</div>
</div>
</div>";
}
add_shortcode('our_teams_item', 'our_teams_item');
function our_teams_item($atts, $content = null)
{
extract(shortcode_atts(array(
'image' => '',
'text1' => '',
'num' => '',
'text2' => '',
'icon' => 'icon-signs',
'link' => ''
) , $atts));
$img_arr = $atts['image'];
$image_url = wp_get_attachment_image_src($img_arr, 'full');
$content = " <div class=\"carousel-item-teams index-z1\"> <a href=\"{$link}\" class=\"tt-box-layout-01\"> <div class=\"tt-img\"> <img src=\"$image_url[0]\" alt=\"\"> </div> <div class=\"tt-description\"> <div class=\"col\"> <div class=\"tt-icon\"> <img src=\"" . get_template_directory_uri() . "/img/block-team.png\" alt=\"\"> <i class=\"{$icon}\"></i> </div> </div> <div class=\"col\"> <h6 class=\"tt-title\">{$text1}</h6> <p>{$text2}</p> </div> </div> </a> </div>";
return $content;
}