投稿をカスタマイズして、高度なカスタム フィールド プラグインをインストールしようとしています。カスタム フィールドはエディターに表示されていますが、すべての the_field('fieldname') を単一の投稿ページに追加すると、投稿に表示されますが、すべて 1 行で表示されます。
私が使用しているテーマは Twenty Fourteen です。以下は、フィールドを配置したループです
<?php
// Start the Loop.
while ( have_posts() ) : the_post();
get_template_part( 'content', get_post_format() );
the_field('make');
the_field('type');
the_field('year');
the_field('hours');
the_field('location');
the_field('specifications');
// Previous/next post navigation.
twentyfourteen_post_nav();
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) {
comments_template();
}
endwhile;
?>
投稿では次のようになります。 http://www.hamburgheros.com/2014/02/12/klemm-kr-909-1/
私はそれが次のように出てくることを望みます:
メーカー: KLEMM KR 909-1 タイプ: ドリル 年: 2012 時間: 100 場所: ドイツ 仕様: 多目的 / アンカー ドリル リグ
Deutz Engine TCD 2013 L4 2V – 129 KW / 175 HP (EPA / TIERIII)
Crawler type B1 / 400 mm 3-grouser pads
Drill mast type 305
Hammer KD1624
Different options for double head drilling units and rotary heads
Different options for clamping and breaking devices
Remote controlled drilling functions
Second articulation cylinder
Winch
Flushing 1” / 1 ½ “
Oiler 8 l, 20 bar
Weight: 13 t
the_field('フィールド名') \n; を試しました。しかし、それは機能しません。また、フィールド名も表示するにはどうすればよいですか?
助けてください、とても感謝します。
アルセブ