The Customizer (Appearance → Customize) is WordPress's built-in screen for small, site-wide settings, with a live preview alongside the settings panel. A custom theme can add its own settings to it — a secondary logo, a phone number, a social link — anything that's a single value used site-wide rather than per-page content.
<?php
function mytheme_customize_register( $wp_customize ) {
$wp_customize->add_section( 'mytheme_contact', [
'title' => __( 'Contact Info', 'mytheme' ),
'priority' => 30,
] );
$wp_customize->add_setting( 'mytheme_phone' );
$wp_customize->add_control( 'mytheme_phone', [
'label' => __( 'Phone Number', 'mytheme' ),
'section' => 'mytheme_contact',
'type' => 'text',
] );
}
add_action( 'customize_register', 'mytheme_customize_register' );Three pieces, always in this order: a section to group related settings under a heading, a setting to store the actual value, and a control to give that setting an input field in the panel. An image upload works the same way, using WP_Customize_Image_Control in place of a plain text control.
<?php $phone = get_theme_mod( 'mytheme_phone' ); ?>
<?php if ( $phone ) : ?>
<a href="tel:<?php echo esc_attr( preg_replace( '/[^\d+]/', '', $phone ) ); ?>"><?php echo esc_html( $phone ); ?></a>
<?php endif; ?>get_theme_mod() reads whatever was saved — it returns false (or your own chosen default, passed as a second argument) if the setting has never been set, so it's always worth checking before using the value.
When to reach for SCF instead
The Customizer is genuinely the right tool for a handful of small, global settings — but it doesn't scale well past that. A settings screen with a dozen fields, repeatable content, or anything more structured belongs in an SCF options page instead, covered later in this section — it's built for exactly that case, with a much richer set of field types.
With the site-wide chrome — header, footer, menus, small settings — all covered, the next lesson closes out this first part of the section: turning off the block editor for good, so every content screen behaves the way the rest of this section has assumed all along.