我使用ACF为一组特定的自定义贴子标签添加了一个自定义图像字段。我的问题是无法显示图像。是的,我已将图像添加到标签并进行了更新。
$term_id = 26;
$taxonomy_name = \'tags\';
$termchildren = get_term_children( $term_id, $taxonomy_name );
foreach ( $termchildren as $child ) {
$term = get_term_by( \'id\', $child, $taxonomy_name );
$tag_image = get_field(\'tag_image\');
echo \'<a href="?categories=\' . $term->slug . \'">\'. $term->name . \'</a>\';
echo $tag_image; //this bit doesn\'t work :(
}