В functions.php добавить параметры customizer
add_action('customize_register', 'dco_customize_register');
function dco_customize_register($wp_customize) {
//FOOTER
$wp_customize->add_section('footer', array(
'title' => 'Подвал',
'priority' => 1,
));
//footer text
$setting_name = 'footer_text';
$wp_customize->add_setting($setting_name, array(
'default' => '',
'sanitize_callback' => 'sanitize_textarea_field',
'transport' => 'postMessage'
));
$wp_customize->add_control($setting_name, array(
'section' => 'footer',
'type' => 'textarea',
'label' => 'Текст в подвале',
));
$wp_customize->selective_refresh->add_partial($setting_name, array(
'selector' => '.footer-desc',
'render_callback' => function() use ($setting_name) {
return nl2br(get_theme_mod($setting_name));
}
));
}
И в шаблоне footer.php в нужном месте вывести
<div class="footer-desc"><?php echo nl2br(get_theme_mod('footer_text')); ?></div>