textarea_html无法使用Visual Composer

Fai*_*ali 3 wordpress

我在Visual Composer 5.1中使用WordPress 4.9.2我想在VC上添加文本编辑器,但它无法正常工作

vc_map( array(
    "name" => esc_html__("SNS Test",'themeles'),
    "base" => "sns_test",
    "icon" => "sns_icon_test",
    "class" => "sns_test",
    "category" => esc_html__("SNS Test",'themeles'),
    "description" => esc_html__( "test ",'themeles' ),
    "params" => array(
          array(
            "type" => "textarea_html",
            "class" => "",
            "heading" => esc_html__("Description",'snsanton'),
            "param_name" => "product_excerpt",
            "value" => "",
            "description" => esc_html__("Custom the description for the 
              product.", 'snsanton'),
        ),
      .....
  ));
Run Code Online (Sandbox Code Playgroud)

文本不保存HTML不像强大或我

小智 6

它不起作用,因为您的参数名称必须为" content".

文档说明了这一点:

带有默认WordPress WYSIWYG编辑器的文本区域.重要提示:每个短代码只允许一个html textarea,它应该有"content"作为param_name

  • 超级有帮助.对于其他任何人来说,param_name内容然后在短代码模板中用作$ content,而不是作为属性而不需要通过shortcode_atts()指定. (3认同)