我已经讨论了其他一些类似的话题,但任何解决方案都不适合我。
基本上,如果自定义字段中添加了信息,我只想显示一个。
这是我的代码,即使你没有给我一个答案,你能告诉我正确的方向吗。
<div class="height">
<div class="fourcol">
<p class="business"><?php the_field(\'helpline_name\'); ?></p> <div class="category"><p>AREAS OF HELP: <?php the_category(\', \') ?></p> </div>
<p><?php the_field(\'helpline_address\'); ?></p>
</div>
<div class="fivecol">
<p class="phone"><?php the_field(\'helpline_phone_number\'); ?></p>
</div>
<div class="threecol last">
<ul>
<li><a href="http://<?php echo the_field(\'helpline_url\'); ?>" class="tiptip web" title="<?php echo the_field(\'helpline_url\'); ?>" target="_blank"><?php echo the_field(\'helpline_url\'); ?></a></li>
<li><a href="" class="tiptip comments" title="read comments from others" target="_blank"><?php echo the_field(\'helpline_comments\'); ?></a></li>
<li><a href="mailto:<?php echo the_field(\'helpline_email\'); ?>" class="tiptip email" title="email us your problem"><?php echo the_field(\'helpline_email\'); ?></a></li>
</ul>
提前谢谢Tyler