Viewing 6 replies - 1 through 6 (of 6 total)
  • How exactly are you including Kirki?
    Could you please post the code you’re using?
    I’ll need more details…

    Hi,

    We are using a kirki plugin in our theme.

    We including it in our themes “functions.php” file.

    Here is a code.

    if (!class_exists('Kirki')) {
        include_once(dirname(__FILE__) . '/inc/kirki/kirki.php');
    }
    function matrix_minimal_customizer_config()
    {
        $args = array(
            'url_path' => get_stylesheet_directory_uri() . '/inc/kirki/',
            'capability' => 'edit_theme_options',
            'option_type' => 'option',
            'option_name' => 'matrix_theme_options',
            'compiler' => array(),
            'color_accent' => '#27bebe',
            'width' => '20%',
            'description' => 'Visit our site for more great Products.If you like this theme please rate us 5 star',
        );
        return $args;
    }
    
    add_filter('kirki/config', 'matrix_minimal_customizer_config');

    Here you can see our theme for more detail how we including kirki in kyma.

    Link is HERE

    Thank You

    Thread Starter WebHunt Infotech

    (@webhuntinfotech)

    Hi,

    Thank you for quick reply.

    We already include kirki customizer into parent theme.

    but when we create a child-theme then kirki customizer not working.

    In kirki customizer we can’t change/edit any options.

    That means we can’t save the changes into kirki customizer under “Child-Theme”.

    If we include kirki customizer into “Child-Theme” then its working properly.

    Any help would be appreciated.

    Thank You

    That’s an issue with the matrix theme because they use get_stylesheet_url to manually poverride the URL of Kirki.

    Please add the following in your child theme’s functions.php file:

    add_filter( 'kirki/config', function( $config ) {
    	$config['url_path'] = trailingslashit( get_template_directory_uri() ) . 'inc/kirki';
    	return $config;
    }, 99 );
    Thread Starter WebHunt Infotech

    (@webhuntinfotech)

    Hi,

    The above solution work for me.

    Great Work.

    Thank you

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Child-Theme issue’ is closed to new replies.