title: Remove categories from product page (WooCommerce)
body: <p>On my website, the "shop" page which is supposed to only display products is displaying all of the categories first, followed by the products.</p>
  
  <p>I would like to remove the categories from the product listing. You can see an example of the problem at <a href="http://thehonestpet.com/shop/" rel="nofollow noreferrer">http://thehonestpet.com/shop/</a></p>
  
  <p>Categories showing up as products on shop page:</p>
  
  <p><a href="https://i.stack.imgur.com/o4Mab.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/o4Mab.png" alt="Categories"></a></p>
  
  <p>Please advise? </p>
  
  <p>I'm not finding any settings within WordPress to fix this. Perhaps a CSS fix?</p>
  
  <p>The following works, but only hides the categories from the "Shop" page but not the product category page...thoughts?</p>
  
  <pre class="lang-html prettyprint-override"><code>add_filter( 'get_terms', 'get_subcategory_terms', 10, 3 );
  function get_subcategory_terms( $terms, $taxonomies, $args ) {
    $new_terms = array();
  
    // if a product category and on the shop page
    if ( in_array( 'product_cat', $taxonomies ) &amp;&amp; ! is_admin() &amp;&amp; is_shop() ) {
      foreach ( $terms as $key =&gt; $term ) {
        if ( ! in_array( $term-&gt;slug, array( 'bedding', 'feeders-bowls', 'accessories', 'food', 'treats' ) ) ) {
          $new_terms[] = $term;
        }
  
      }
  
      $terms = $new_terms;
    }
  
    return $terms;
  }
  </code></pre>