Radio Image

Kirki Radio Image

You can define the available options using the choices argument as seen in the example below.

Example

new \Kirki\Field\Radio_Image(
	[
		'settings'    => 'radio_image_setting',
		'label'       => esc_html__( 'Radio Image Control', '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',
		],
	]
);

Was this helpful?