1

In the customizer, the site identity section is missing a logo upload field. Adding such field is not a big deal: A field can be added, but I don't know the section name that is created in the core of the WordPress. Can someone help me in that?

The field can be created like this:

    $fields[] = array(
    'type'        => 'color',
    'setting'     => 'links_color',
    'label'       => __( 'Links Color', 'twentytwelve' ),
    'section'     => 'header',
    'default'     => '#00A2E8',
    'priority'    => 10,
    'output'      => array(
        'element'  => 'body #page a, body #page a:link, body #page a:visited, body #page a:hover',
        'property' => 'color',
    )
);

The below is a section for the header:

'section'     => 'header',

I want to know the section name of the site identity so that the logo option can be added there.enter image description here

3

The “Site Identity” section has the ID of title_tagline for historical reasons.

If you want to see the IDs for the core sections, all you have to do is look at the source for WP_Customize_Manager::register_controls(). Alternatively, you can get a list of all the sections registered, whether by core or by plugins, by opening your console and entering: _.keys( wp.customize.settings.sections ).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.