ACF Display custom taxonomy

สำหรับคนที่มี Custom Posttype และมี Custom Taxonomy อยากจะให้มันแสดง รายการที่อยู่ใน หมวดหมู่นั้น ทำตามได้เลยดังนี้

flat screen monitor
<?php $terms = get_the_terms( $post->ID, 'car-model' ); 
foreach( $terms as $term ) {
echo $term->name; }?>

ใส่ความเห็น

อีเมลของคุณจะไม่แสดงให้คนอื่นเห็น ช่องข้อมูลจำเป็นถูกทำเครื่องหมาย *