I'm attemptin to show different header images based on the page a user visits. The code below works great except for is\_archive(listings)

For some reason it wants to use the image from is\_archive(team)

```
<div class="header-images">
   <?php if (is_archive('team')) { ?>
<img src="<?php the_field('header_image_team', 'options'); ?>" class="img-responsive bkg" />

   <?php } elseif (is_singular('team')) { ?>
<img src="<?php the_field('header_image_team', 'options') ?>" class="img-responsive bkg" /> 

   <?php } elseif (is_archive('listings')) { ?>
<img src="<?php the_field('header_image_listings', 'options'); ?>" class="img-responsive bkg" />

   <?php } elseif (is_singular('listings')) { ?>
<img src="<?php the_field('header_image_single') ?>" class="img-responsive bkg" />

   <?php } elseif (is_home()) { ?>
<img src="<?php the_field('header_image_ic', 'options') ?>" class="img-responsive bkg" /> 
   <?php } ?>

```

For what it's worth, I am using this with Advanced Custom Fields PRO. So I've setup an options page for the custom post types: team & listings. In each post types menu there is a settings panel with the ability to upload an image.

The singular 'listings' pull an image from each post and then of course is\_home (the default blog) has an options panel with an image to upload as well.

Overall, If I am not declaring that the archive page for 'listings' is suppose to show the team image, then it shouldn't show anything all, right?

Here's the function for ACF Pro options.

```
if( function_exists('acf_add_options_page') ) {
  acf_add_options_page(array(
    'page_title'  => 'Theme General Settings',
    'menu_title'  => 'Theme Settings',
    'menu_slug'   => 'theme-general-settings',
    'capability'  => 'edit_posts',
    'redirect'    => false
  ));

  acf_add_options_sub_page(array(
    'page_title'  => 'Theme Header Settings',
    'menu_title'  => 'Header',
    'parent_slug' => 'theme-general-settings',
  ));

  acf_add_options_sub_page(array(
    'page_title'  => 'Theme Footer Settings',
    'menu_title'  => 'Footer',
    'parent_slug' => 'theme-general-settings',
  ));

  acf_add_options_sub_page(array(
    'title'      => 'Team Settings',
    'parent'     => 'edit.php?post_type=team',
    'capability' => 'manage_options'
  ));

  acf_add_options_sub_page(array(
    'title'      => 'Listings Settings',
    'parent'     => 'edit.php?post_type=listings',
    'capability' => 'manage_options'
  ));

  acf_add_options_sub_page(array(
    'title'      => 'Industry Coverage Settings',
    'parent'     => 'edit.php',
    'capability' => 'manage_options'
  ));
}

```