title: Sort Woocommerce Products from a product category and custom meta_key
body: <p>Im successfully filtering ALL my Wordpress posts by Likes (count) with a Custom Plugin (and meta_key) wich also let me filter the most liked posts in categories. I display (query) the result in a custom page template. Everything works fine. </p>
  
  <p>The Like function works also on Woocommerce Products. But so far i was not able to set up a page where i sort the Products (post_type) the same way in a specific shop cateogry as i do it with my posts. The closest i came was to display the most liked posts on the page BUT the sorting for a category does not filter the posts - it displays the same as in the main page. The category List and the url call for the cateogy links are working fine. </p>
  
  <p><strong>NOTE:</strong> THE url query-string "product-cato" is a custom one - im using a ajax filter plugin wich uses this query-string and the category id like <code>.../?product-cato=6</code>Please do not mix it up wicht <code>product_cat</code> for example</p>
  
  <p>This is what i came up so far - beginning with the code for the posts (wich works fine). Any idea how to solve this issue? thx</p>
  
  <p><strong>The query</strong> (works fine)</p>
  
  <pre><code>if (isset($_GET['category'])) {
      $args = array(
      'meta_key' =&gt; '_recoed',
      'meta_compare' =&gt; '&gt;',
      'meta_value' =&gt; '0',
      'orderby' =&gt; 'meta_value_num',
      'order' =&gt; 'DESC',
      'category_name' =&gt; sanitize_text_field($_GET['category']),
      'paged' =&gt; $paged
      );
  } 
  
   query_posts($args);
  </code></pre>
  
  <p><strong>The Category List to Filter the Post in each Category</strong> (works fine)</p>
  
  <pre><code>&lt;?php $categories = get_categories();
  
  foreach($categories as $category) { ?&gt;
      &lt;li&gt;
          &lt;a class="popular-categories" href="&lt;?php echo get_permalink(); ?&gt;?category=&lt;?php echo $category-&gt;category_nicename; ?&gt;"&gt;&lt;?php echo $category-&gt;name; ?&gt;&lt;/a&gt; 
      &lt;/li&gt;
  &lt;?php } ?&gt;
  </code></pre>
  
  <p>Now the Woocommerce Query and Category Part where I am  stucks</p>
  
  <p><strong>The Query for the Products post_type</strong></p>
  
  <pre><code>    if (isset($_GET['product-cato'])) {
      $args = array(
      'meta_key' =&gt; '_recoed',
      'meta_compare' =&gt; '&gt;',
      'meta_value' =&gt; '0',
      'post_type' =&gt; 'product',
      'orderby' =&gt; 'meta_value_num',
      'order' =&gt; 'DESC',
      'taxonomy' =&gt; sanitize_text_field($_GET['product_cat']),
      'paged' =&gt; $paged
  );
  
  query_posts($args);
  </code></pre>
  
  <p><strong>The Category List to Filter the Post in each Shop-Category</strong></p>
  
  <pre><code>&lt;?php
      $product_categories = get_terms( 'product_cat' );
      $count = count($product_categories);
  
      foreach ( $product_categories as $product_category ) { ?&gt;
          &lt;li&gt;
              &lt;a class="popular-categories" href="&lt;?php echo get_permalink(); ?&gt;?product-cato=&lt;?php echo $product_category-&gt;term_id; ?&gt;"&gt;&lt;?php echo $product_category-&gt;name; ?&gt;&lt;/a&gt;
          &lt;/li&gt;
      } 
  ?&gt;
  </code></pre>