• Resolved WebHunt Infotech

    (@webhuntinfotech)


    Hi,

    We are using a kirki customizer in our matrix theme.

    We want to add new social icons into header top bar like: YouTube, Instagram

    etc. using “Child-Theme”. We have added social icons option into

    “functions.php” file into our “Child-Theme” directory.

    This is a actual code in matrix-child theme.

    function matrix_child_theme_setup()
    {
    Kirki::add_field('matrix_theme', array(
        'settings' => 'social_youtube_link',
        'label' => __('YouTube Link', 'matrix'),
        'section' => 'social_sec',
        'type' => 'url',
        'priority' => 10,
        'transport' => 'postMessage',
        'default' => 'http://www.youtube.com/',
        'sanitize_callback' => 'esc_url_raw'
    ));
    Kirki::add_field('matrix_theme', array(
        'settings' => 'social_pinterest_link',
        'label' => __('Pinterest Link', 'matrix'),
        'section' => 'social_sec',
        'type' => 'url',
        'priority' => 10,
        'transport' => 'postMessage',
        'default' => 'http://www.pinterest.com/',
        'sanitize_callback' => 'esc_url_raw'
    ));
    }
    add_action('after_setup_theme', 'matrix_child_theme_setup');

    But its show an error Undefined index: social_youtube_link

    Undefined index: social_pinterest_link.

    Then please let us know how we can define the above options using “Child-Theme”.

    Please provide solution asap.

    You can see our matrix theme package here:

    Matrix

    Thank you

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Undefined index Error’ is closed to new replies.