I am trying to create a custom theme using WordPress 3.4’s customization options. I would like to create an option to change the theme’s logo, but I would like to also display a default logo image.
I am using the following code in my function.php page:
$defaultbranding = "get_bloginfo('template_directory') . '/images/logo.png";
$wp_customize->add_setting( 'change_branding', array(
'default' => get_bloginfo('template_directory') . '/images/logo.png',
) );
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'change_branding', array(
'label' => 'Image Control',
'section' => 'theme_settings',
'settings' => 'change_branding',
) ) );
And in the theme’s header.php page:
src="https://wordpress.stackexchange.com/questions/63356/<?php echo get_theme_mod("change_branding' , 'default' ) ?>'
I would like the ‘default’ value on the front end to be:
get_bloginfo('template_directory') . '/images/logo.png'
Is there some way I can achieve this?
Thanks in advance for any help.