Ben wordpress veritabanından bir sitenin açıklama kısmına nitelikleri çekiyorum. Ancak burada 3 adet çekilmesini istemediğim nitelik mevcut ( çünü onları başka yere çekiyorum ) bu 3 id yi çekmeyi nasıl engelleyebilirim ? yani 8, 9 , 5 , bu id ler gelmesin isttiyorum onun dışında ki bütün idler gelsin.
Kodum bu şeikilde
add_action( 'woocommerce_shop_loop_item_title', 'custom_attributes_display', 20 );
function custom_attributes_display(){
global $product;
if( ! $product->is_type( 'simple' ) ) return;
$loop_count = 0;
echo '<div>';
$attributes_taxonomy = $product->get_attributes();
foreach( $attributes_taxonomy as $taxonomy => $attribute ) {
$attribute_terms = wp_get_post_terms( get_the_id(), $taxonomy, array( 'fields' => 'names' ) );
$terms_string = implode( ',', $attribute_terms );
if( count( $attribute_terms ) > 0 ){
echo '<p style="border:solid">'.$attribute->get_name().' : '.$terms_string.'</p>';
$attr_count = count( $attributes_taxonomy );
$loop_count++;
}
}
echo '</div>';
}