function themeslug_theme_customizer( $wp_customize ) {
$wp_customize->add_section( 'themeslug_logo_section' , array(
'title' => __( 'Header Logo', 'themeslug' ),
'priority' => 30,
'description' => 'Upload a logo to replace the default site name and description in the header',
) );
//ADD SETTINGS
$wp_customize->add_setting( 'themeslug_logo' );
$wp_customize->add_setting( 'themeslug_logo_footer' );
//ADD LOGO IN HEADER
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'themeslug_logo', array(
'label' => __( 'Logo', 'themeslug' ),
'section' => 'themeslug_logo_section',
'settings' => 'themeslug_logo',
) ) );
//ADD LOGO IN FOOTER
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'themeslug_logo_footer', array(
'label' => __( 'Footer Logo', 'glide' ),
'section' => 'themeslug_logo_section',
'settings' => 'themeslug_logo_footer',
) ) );
//ADD ANY OF PAGE DROPDOWN
$wp_customize->add_setting('apply_page_id');
$wp_customize->add_control(
'apply_page_id', array(
'type' => 'dropdown-pages',
'label' => esc_html__('Apply Page', 'parallaxsome'),
'description' => esc_html__('Select page for Homepage Apply Section', 'parallaxsome'),
'section' => 'themeslug_logo_section',
'priority' => 35
)
);
}
add_action( 'customize_register', 'themeslug_theme_customizer' );
//In HTML (Front) view
<img src='<?php echo esc_url(get_theme_mod('themeslug_logo_footer')); ?>'>
Show Comments
