WordPress Customizer Link Control

Learn how to create a link control using the Kirki Customizer Framework.

Back to Controls

Returnsstring

The link control is a simple text-input control, with URL sanitization. Values are sanitized using the esc_url_raw() function.

Example:

Kirki::add_field( 'theme_config_id', [
	'type'     => 'link',
	'settings' => 'my_setting',
	'label'    => __( 'Link Control', 'kirki' ),
	'section'  => 'section_id',
	'default'  => 'https://wplemon.com/',
	'priority' => 10,
] );

Can't find what you're looking for? Check the github issues or edit this page to add what's missing.