advanced custom fields アドバンスカスタムフィールドで ラベル名を出力させる方法

http://blog.pianoman-net.com/?p=5580

1
2
3
4
5
6
7
8
http://mekemoke.jp/2013/03/1065.html
 
    // ループ外でOK
    $fields = get_field_object('field_1');
    $choices = $fields['choices'];
    if (have_posts()) : while (have_posts()) : the_post();
        echo '<img src="./images/'. get_field('dessert') .'.gif" alt="'. $choices[get_field('dessert')] .'" />';
    endwhile; endif; wp_reset_query();
1
2
3
4
<?php $fields = get_field_object('field_543e0d221abb2');
$choices = $fields['choices'];
echo $choices[get_field('car_year')]
 ?>

http://blog.cgfm.jp/garyu/archives/3005
チェックボックスで複数選択した値を出力する