Title: loop prodcuts with specific attribute
Last modified: August 21, 2016

---

# loop prodcuts with specific attribute

 *  [MarcoBe](https://wordpress.org/support/users/marcobe/)
 * (@marcobe)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/loop-prodcuts-with-specific-attribute/)
 * I need to loop on homepage of my site only product with specific custom attribute.
 * i have set in some products an attribute with slug “best” and need to filter 
   only value “yes” of that attribute.
 * I’ve tried:
 * $args = array(
    ‘post_type’ => ‘product’, ‘numberposts’ => -1, ‘meta_query’ =
   > array( array( ‘key’ => ‘best’, ‘value’ => ‘yes ) )
 * );
    $my_query = new WP_Query($args);
 * //print_r($my_query);
 * if ( $my_query->have_posts()) : while ( $my_query->have_posts() ) : $my_query-
   >the_post(); $_product = new jigoshop_product( $post->ID );
 * … but no result… could you please help? thank you very much
 * [https://wordpress.org/plugins/jigoshop/](https://wordpress.org/plugins/jigoshop/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Jigoshop Support – Paul](https://wordpress.org/support/users/paulpreston/)
 * (@paulpreston)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/loop-prodcuts-with-specific-attribute/#post-4995696)
 * Hi MarcoBe,
 * I will pass your questions onto our developers.
 * We should expect some feedback in the next 4-8 hours.
 *  Plugin Author [MWSGD](https://wordpress.org/support/users/mwsgd/)
 * (@mwsgd)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/loop-prodcuts-with-specific-attribute/#post-4995870)
 * Hi MarcoBe,
 * Did Paul ever get back to you at all? Does this issue still persist?

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘loop prodcuts with specific attribute’ is closed to new replies.

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

 * 2 replies
 * 3 participants
 * Last reply from: [MWSGD](https://wordpress.org/support/users/mwsgd/)
 * Last activity: [11 years, 10 months ago](https://wordpress.org/support/topic/loop-prodcuts-with-specific-attribute/#post-4995870)
 * Status: not resolved