radio-image

You can define the available options using the choices argument and formating them as an array key => URL.

Example

Kirki::add_field( 'theme_config_id', [
	'type'        => 'radio-image',
	'settings'    => 'radio_image_setting',
	'label'       => esc_html__( 'Radio Control (Image)', 'kirki' ),
	'section'     => 'section_id',
	'default'     => 'left',
	'priority'    => 10,
	'choices'     => [
		'left'   => get_template_directory_uri() . '/assets/images/left.png',
		'center' => get_template_directory_uri() . '/assets/images/center.png',
		'right'  => get_template_directory_uri() . '/assets/images/right.png',
	],
] );

Last updated on: May 10th, 2020

Scroll to Top

Download

Subscribe & be the first to be informed about
new features & updates!