Are you a theme author? Checkout new Kirki Helpers for your themes, or start something new using our _s fork as a starting point!


Improve this page

settings is a mandatory argument for any field. The value entered here will be used to store the settings in the database.

If for example you create a field using something like this:

Kirki::add_field( 'my_config', array(
    'type'        => 'color',
    'settings'    => 'body_background_color',
    'label'       => __( 'This is the label', 'my_textdomain' ),
    'section'     => 'my_section',
    'default'     => '#0088CC',
    'priority'    => 10,
    'alpha'       => true,
) );

then in your theme you can access that value using:

<?php $color = get_theme_mod( 'body_background_color', '#0088CC' ); ?>
The following docs are for Kirki 2.2.0 and above.