title: Check if wordpress archive page with all posts in concept
body: <p>I have the following code which places text in a header based on what part of the site you are on:</p>
  
  <pre><code>&lt;h1 class="heading"&gt;
      &lt;?php 
          $posttype = get_post_type();
          switch ($posttype) {
               case "tekenplannen":
                  echo "Tekenplannen - " . $details[ 'title' ]; 
                  break;
              case "vacatures":
                  //check if we are on the archive page
                  if (is_archive()) {
                       echo "Open vacatures"; 
                  } else {
                      echo "Vacature - " . $details[ 'title' ]; 
                  }
                   break;
              case "object":
                  if (is_archive()) {
                       echo "Toonzaal"; 
                  } else {
                      echo $details[ 'title' ]; 
                  }
                  break;
              case "nieuws":
                  //check if we are on the archive page
                  if (is_archive()) {
                      echo "Nieuws"; 
                  } else {
                      echo $details[ 'title' ]; 
                  }
                  break;
              default:
                   echo $details[ 'title' ]; 
                  break;
              }
          ?&gt;
  &lt;/h1&gt;
  </code></pre>
  
  <p>This code works perfectly fine as long as my archive page has a post published. 
  Imagine now that for example my "vacatures" custom post type has 4 published posts, my header title will contain "Vacatures" which is ok. Imagine now that I want to hide all my 4 posts, so they are placed in "draft" mode. If I then check my vacatures archive page again, the title will contain the text "Archives". 
  Why is this not being caught by the <em>is_archive()</em> function? How do I catch this?</p>
  
  <p>Thanks in advance</p>