settings

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

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( 'global', [
    'type'     => 'color',
    'settings' => 'body_background_color',
    'label'    => esc_html__( 'This is the label', 'my_textdomain' ),
    'section'  => 'my_section',
    'default'  => '#0088CC',
    'priority' => 10,
] );

then in your theme you can access that value using:

<?php $color = get_theme_mod( 'body_background_color', '#0088CC' ); ?>
Edit this page