Removed need to mandatory exclude meta

This commit is contained in:
Mike Jolley 2012-01-18 17:32:24 +00:00
parent ef0ce00090
commit 7675fd7ab1
1 changed files with 4 additions and 9 deletions

View File

@ -17,21 +17,16 @@ global $post, $woocommerce;
'post__not_in' => array($thumb_id),
'post_mime_type'=> 'image',
'orderby' => 'menu_order',
'order' => 'ASC',
'meta_query' => array(
array(
'key' => '_woocommerce_exclude_image',
'value' => '1',
'compare' => '!='
)
)
'order' => 'ASC'
);
$attachments = get_posts($args);
if ($attachments) :
$loop = 0;
$columns = apply_filters('woocommerce_product_thumbnails_columns', 3);
foreach ( $attachments as $attachment ) :
if (get_post_meta($attachment->ID, '_woocommerce_exclude_image', true)==1) continue;
$loop++;
$_post = & get_post( $attachment->ID );