I'm trying to add a custom image setting to a custom panel/section for the header.
In functions.php, I used:
$wp_customize->add_setting('swag_header_logo'); $wp_customize->add_control(new WP_Customize_Upload_Control($wp_customize,'swag_header_logo',array( 'label' => __('Logo', 'frontend-theme'), 'section' => 'swag_header_content_section', 'settings' => 'swag_header_logo' )));
Which shows up and seems to work in the customizer. However, when trying to get it to show up in the header, it gives the error:
Fatal error : Call to undefined function swag_header_logo() in /home/xxxxxx/public_html/wp-content/themes/frontend-theme/header.php on line 551
The code I used in the header.php:
$swag_header_logo = get_theme_mod('swag_header_logo');
<?php swag_header_logo(); ?>
How do I fix the error?