Exactly the same as select controls.

The only difference is that the field type is defined as dropdown-pages and it will show a list of your pages. As a result, you don’t have to manually define the choices argument as it will be auto-populated using your pages.

The default value for dropdown-pages controls can be a page ID (int).

example: 'default' => 42, The returned value is the ID of the selected page.


Kirki::add_field( 'theme_config_id', [
	'type'        => 'dropdown-pages',
	'settings'    => 'dropdown_pages_setting',
	'label'       => esc_html__( 'Dropdown Pages', 'kirki' ),
	'section'     => 'section_id',
	'default'     => 42,
	'priority'    => 10,
] );

Last updated on: May 10th, 2020

Scroll to Top


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