0
我在我的wp站點上安裝了高級自定義字段類別。但我無法在循環類別中獲得字段。代碼:WordPress的。如何獲得類別中的自定義文件?
$args = array(
'type' => 'post',
'orderby' => 'name',
'order' => 'ASC',
'hide_empty' => 0,
'taxonomy' => 'catalog'
);
$categories = get_categories($args);
if($categories){
foreach($categories as $cat){
echo get_term_meta($cat->cat_ID, 'image_cat',true); //empty
}
}
我如何從ACF獲取字段?
TNX!是工作 ) –