Title: adding specific category query
Last modified: August 21, 2016

---

# adding specific category query

 *  [biso38](https://wordpress.org/support/users/biso38/)
 * (@biso38)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/adding-specific-category-query/)
 * hello there iam aweb developer and i am really intersted on your plugin actually
   i was trying to extend it to add the fucnction of querying only spesfic parent
   category here is what i used in the query var
 *     ```
       //$biso=233;
   
       		// 	$query = "SELECT  c.*
       		// 	FROM {$wpdb->prefix}posts p LEFT JOIN wp_term_relationships ON p.ID = wp_term_relationships.object_id  ,
       		// 	 {$wpdb->prefix}comments c 
   
       		// 	 WHERE   p.ID = c.comment_post_ID   AND c.comment_approved > 0 AND p.post_type = 'product' AND p.post_status = 'publish' AND
       		// 	  p.comment_count > 0 AND  term_taxonomy_id = 233  ORDER BY ".$order_by." LIMIT 0, ". $number_of_comments;
       ```
   
 * but for some reason it’s not working it’s getting wrong comment’s not on the 
   233 taxonomy .. any help will be apperciated and i will be glad to hand you over
   my source code to use in future ver’s .. thanks asem
 * [https://wordpress.org/plugins/woocommerce-reviews-widget/](https://wordpress.org/plugins/woocommerce-reviews-widget/)

The topic ‘adding specific category query’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/woocommerce-reviews-widget_ededed.
   svg)
 * [WooCommerce - Reviews Widget](https://wordpress.org/plugins/woocommerce-reviews-widget/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-reviews-widget/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-reviews-widget/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-reviews-widget/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-reviews-widget/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-reviews-widget/reviews/)

## Tags

 * [php](https://wordpress.org/support/topic-tag/php/)
 * [query](https://wordpress.org/support/topic-tag/query/)
 * [sql](https://wordpress.org/support/topic-tag/sql/)

 * 0 replies
 * 1 participant
 * Last reply from: [biso38](https://wordpress.org/support/users/biso38/)
 * Last activity: [11 years, 11 months ago](https://wordpress.org/support/topic/adding-specific-category-query/)
 * Status: not resolved