title: Else If loop in wordpress for dynamic banner
body: <p>I have the  following code as a Loop in my category.php page. Its showing a dynamic banner when its coming from home page to this paape. I tried to filter by slug. and put them in else if loop. There will be several pages. But its showing an error.</p>
  
  <p>syntax error, unexpected 'elseif' (T_ELSEIF) </p>
  
  <pre><code>&lt;?php if($category_slug=='abc-bed'){?&gt;  
          &lt;div id="catHero"&gt;
              &lt;div id="blackPostBox"  class="&lt;?php echo "cat_id_" . $category_slug?&gt;"&gt; 
                  &lt;h1 id="cath1"&gt;&lt;?php echo $root[0]-&gt;post_title ?&gt;&lt;/h1&gt;
                  &lt;hr class="color-strip"&gt;    
                  &lt;p&gt;&lt;?php echo $text = apply_filters('the_excerpt', get_post_field('post_excerpt', $root[0]-&gt;post_content ));?&gt;&lt;/p&gt;
                  &lt;div class="searchbar"&gt;&lt;?php get_search_form(); ?&gt;&lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
  
      &lt;?php elseif ($category_slug=='abc_efg') {?&gt;
          # code...
      &lt;?} ?&gt;
      &lt;?php else ($category_slug=='abc_rrg') {?&gt;
          # code...
      &lt;?} ?&gt;
      &lt;?php }?&gt;
  </code></pre>