title: Category-slug not working
body: <p>I am developing a website for quotes, in that I want different category page template page for each category for that I followed below link of wordpress:</p>
  
  <p><a href="https://codex.wordpress.org/Category_Templates" rel="nofollow">https://codex.wordpress.org/Category_Templates</a></p>
  
  <p>According to that I made different category-popular <code>author.php</code> (also tried category-7.php bt wasn't worked) other than my original <code>category.php</code> file, but doesn't work. I also tried some other options like:</p>
  
  <p>1) Tried this code in </p>
  
  <pre><code>functions.php
  function wpse_category_single_template( $single_template ) {
      global $post;
      $all_cats = get_the_category();
  
      if ( $all_cats[0]-&gt;cat_ID == '1' ) {
          if ( file_exists(get_template_directory() . "/single-cat1.php") )           return get_template_directory() . "/single-cat1.php";
      } elseif ( $all_cats[0]-&gt;cat_ID == '2' ) {
          if ( file_exists(get_template_directory() . "/single-cat2.php") ) return get_template_directory() . "/single-cat2.php";
      }
      return $single_template;
  }
  add_filter( 'single_template', 'wpse_category_single_template' );
  </code></pre>
  
  <p>but wasn't worked</p>
  
  <p>2) Changed my permalink structure.</p>
  
  <p>3) Tried to put <code>if...else</code> condition in <code>category.php</code> file like this:</p>
  
  <pre><code>&lt;?php if (is_category('ID')) : ?&gt;
  // Code For Category with defined ID
  &lt;?php else : ?&gt;
  // Code for else
  &lt;?php endif; ?&gt;
  </code></pre>
  
  <p>But still no progress.</p>
  
  <p>Actually wordpress doesn't find my <code>category-slug.php</code> file</p>
  
  <p>What's wrong?</p>