Added custom field to customize

This commit is contained in:
Fabiano 2018-07-25 16:18:09 -03:00
parent 5fe9a0139d
commit 690c14a36b
2 changed files with 8 additions and 4 deletions

View File

@ -20,7 +20,7 @@
else :
echo '</p><p>';
endif;
echo get_option('address-field', '');
echo get_option('blogaddress', '');
?>
</p>
<p>
@ -33,7 +33,7 @@
echo ' - ';
endif;
_e('Telephone: ');
echo get_option('telephone-field', '');
echo get_option('blogphone', '');
?>
</p>
</div>

View File

@ -16,6 +16,10 @@ function tainacan_customize_register( $wp_customize ) {
/**
* Add others infos in Site identity on customize
*/
$wp_customize->add_section('footer_info', array(
'title' => __('Footer settings', 'tainacan-theme'),
'priority' => 200,
));
$wp_customize->add_setting( 'blogaddress', array(
'type' => 'option',
'capability' => 'manage_options',
@ -23,7 +27,7 @@ function tainacan_customize_register( $wp_customize ) {
$wp_customize->add_control( 'blogaddress', array(
'label' => __( 'Address' ),
'section' => 'title_tagline',
'section' => 'footer_info',
) );
$wp_customize->add_setting( 'blogphone', array(
'type' => 'option',
@ -32,7 +36,7 @@ function tainacan_customize_register( $wp_customize ) {
$wp_customize->add_control( 'blogphone', array(
'label' => __( 'Phone Number' ),
'section' => 'title_tagline',
'section' => 'footer_info',
) );
// Add color scheme setting and control.