『Advanced Custom Fields』の出力
『Advanced Custom Fields』のフィールド(テキスト)を記事本文の上に出力したいとき
・wp-contentフォルダ>themesフォルダ>該当のテーマフォルダ>single.php
・single.phpの『<?php the_content(); ?>』の上に記述
<?
//テキスト $txt = get_field('フィールド名');
if($txt){ ?>『フィールドの前に置きたい文字』<? echo $txt; ?>『フィールドの後ろに置きたい文字』
</p><? }
Visited 23 times, 1 visit(s) today