Hi, I built a custom widget, and has this control among others. It does work, but won't trigger _content_template()
, so no real time preview. Why?
$this->add_control(
'optional_type',
[
'label' => __( 'Optional', 'lr' ),
'type' => Controls_Manager::SELECT,
'default' => 'solid',
'prefix_class' => 'option-',
'options' => [
'drum-separator' => __('Drum Separator','lr')
,'dumbo-system' => __('Dumbo system','lr')
,'electrical-box-on-consolle' => __('Electrical box on consolle','lr')
,'humidity-control' => __('Humidity control','lr')
,'infra-red' => __('Infra-red','lr')
,'drum-with-small-perforation' => __('Drum with small perforation','lr')
,'product-injection' => __('Product injection','lr')
,'steam-injection' => __('Steam injection','lr')
,'teflon-drum-door' => __('Teflon drum & door','lr')
,'touch-screen' => __('Touch-screen','lr')
,'trolley-tilter' => __('Trolley tilter','lr')
,'tumbler-conversion' => __('Tumbler conversion','lr')
,'tutor' => __('"Tutor"','lr')
]
]
);
Simply because you have set prefix-class
.
if you want content al well then add 'render_type' => 'template'
.
OK Thank you
Can't find a reference to the 'render_type' option in developer docs
Most helpful comment
Can't find a reference to the 'render_type' option in developer docs