Hey Only Change the code like this
function cult_customizer_register( $wp_customize ) {
$wp_customize->add_section( 'cult_topic_thumb' , array(
'title' => __( 'Topic of the Week' ),
'priority' => 36,
'description' => 'Allows you to upload an image for your topic of the week section.',
) );
$wp_customize->add_setting( 'display_topic_thumb' );
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'display_topic_thumb', array(
'label' => __( 'Display Topic of the Week Thumb' ),
'section' => 'cult_topic_thumb',
'settings' => 'display_topic_thumb',
) ) );
}
add_action('customize_register', 'cult_customizer_register');
And in your index.php call diplay_topic_thumb
<div class="topic_week">
<h1 class="section_heading"> TOPIC OF THE WEEK </h1>
<?php if ( get_theme_mod( 'display_topic_thumb' ) ) : ?>
<div class="photo">
<a href="https://wordpress.stackexchange.com/questions/172426/<?php echo esc_url( home_url("https://wordpress.stackexchange.com/" ) ); ?>' rel="home"><img src="<?php echo esc_url( get_theme_mod( "display_topic_thumb' ) ); ?>' alt="<?php echo esc_attr( get_bloginfo( "name', 'display' ) ); ?>'></a>
</div>
<?php else : ?>
<?php endif; ?>
</div>
It will work fine for you