<?php $value = get_post_meta($post->ID, 'カスタムフィールド名', true);?> <?php if(empty($value)):?> <!--カスタムフィールドに入力がない場合--> <?php else:?> <!--カスタムフィールドに入力が有る場合に表示されます。--> <?php the_field('フィールド名'); ?> <?php endif;?>
<?php $value = get_post_meta($post->ID, 'カスタムフィールド名', true);?> <?php if(empty($value)):?> <!--カスタムフィールドに入力がない場合--> <?php else:?> <!--カスタムフィールドに入力が有る場合に表示されます。--> <?php the_field('フィールド名'); ?> <?php endif;?>
40代webクリエイター
1人が好き、家が好き、副業と投資でお金貯めてます
31歳で貯金200万円、41歳で2000万円、43歳で2400万円達成中
コメント