Cannot view Media Library with custom theme.

I'm in the process of building a custom area on my website. Basically I'm hooking the customizer up to a section on the front page.

So the idea is I go to 'Front Page Banner' via customiser, then select an image. When I click "Select" and go to "Media Library" the spinner just keeps turning and doesn't preview any other images to use.

add_action( 'customize_register', 'pb_customizer_settings' );
function pb_customizer_settings( $wp_customize ) {

$wp_customize->add_section( 'pb_front_page_banner' , array(
'title' => 'Front Page Banner',
'priority' => 30,

$wp_customize->add_setting( 'banner_image' , array(
'transport' => 'refresh',

$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'banner_image', array(
'label' => 'Banner Image',
'section' => 'pb_front_page_banner',

Go to: - WP_DEBUG is enabled so you can see the errors. I'm not sure where these errors are being generated from. It's preventing me from doing anything.

Hope someone can help :slight_smile: