我正在尝试自定义帖子并安装高级自定义字段插件。自定义字段显示在编辑器中,但是当我将所有 the_field('fieldname') 添加到单个帖子页面时,它会显示在帖子中,但它们都在一行中。
我使用的主题是二十四。下面是我放置字段的循环
<?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('field name') \n; 但它不起作用。以及如何使其字段名称也出现?
请帮助,我将非常感激。
阿尔塞夫