title: Omitting item from array, foreach loop wordpress
body: <p>I have created a foreach loop for the category section in my sidebar. Everything is working good, however, I don't want to allow one of the categories to show. I have not been able to find anything on how to null out an object in query or anything.</p>
  <p>here is my code, the name of the category is &quot;general information&quot;</p>
  <pre><code>             &lt;aside class=&quot;sidebar&quot;&gt;
               &lt;div class=&quot;category&quot; data-aos=&quot;fade-left&quot; data-aos-delay=&quot;300&quot;&gt;
                 &lt;h2&gt;Popular Categories&lt;/h2&gt;
                 &lt;ul class=&quot;category-list&quot;&gt;
                &lt;?php
                   $args = array(
                   'orderby'  =&gt; 'count',
                'order'    =&gt; 'DESC'
               );
               $terms = get_terms('category', $args); /*Name Of category*/
                foreach (array_slice($terms, 0, 5)  as $term ):
               ?&gt;
  
             
             &lt;li class=&quot;list-items&quot; data-aos=&quot;fade-left&quot; data-aos-delay=&quot;400&quot;&gt;
             &lt;a href=&quot;&lt;?php echo site_url('/general');?&gt;&quot;&gt; 
             &lt;?php echo 
             $term-&gt;name ;?&gt;  &lt;/a&gt;
            &lt;span&gt;(&lt;?php echo $term-&gt;count ;?&gt;)&lt;/span&gt;
            &lt;/li&gt;
  
             &lt;?php
            endforeach;
            wp_reset_query();
             ?&gt;
             &lt;/ul&gt;
          &lt;/div&gt;
  </code></pre>
  <p>I am guessing that there is a call I can put in the $args(). Any help would be greatly appreciated.</p>