Add class attribute in Custom Post Type

I'm using CPT library and I don't understand how can I add the class attribute on a single input field, I crea

I'm using CPT library and I don't understand how can I add the class attribute on a single input field, I create all the post input as array item:

array( 
    'label' => esc_html__( 'Property Structure Type', 'zoacres' ),
    'desc'  => esc_html__( 'Choose related structure type of this property. You can manage property structure type settings at Theme Options -> Property Settings -> Property General -> Property Structure Types', 'zoacres' ), 
    'id'    => $prefix.'structures',
    'tab'   => esc_html__( 'Property Details', 'zoacres' ),
    'type'  => 'text',
    'options'   => $property_structures_arr,
    'attributes' => array(
         'class' => 'main-container'
     )
),

essentially the code above create a text field, but I want add the class main-container to that input, seems that attributes is not the way to achieve this.

What I did wrong?

official documentation: .5.0/package-CPTUI.Taxonomies.html

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745130594a4612951.html

相关推荐

  • Add class attribute in Custom Post Type

    I'm using CPT library and I don't understand how can I add the class attribute on a single input field, I crea

    6小时前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信