【发布时间】:2017-10-18 19:05:00
【问题描述】:
我在 WordPress 中工作,我需要循环显示帖子的标题和描述。
我不知道如何获取帖子的标题及其描述。
我当前的html代码如下:
<div class="col-md-4 col-sm-6">
<div class="single-service-home">
<div class="icon-box">
<div class="inner-box">
<i class="flaticon-gesture-1"></i>
</div>
</div>
<div class="content">
<h3>Charity For Education</h3>
<p>There are many variations of lorem <br>passagei of Lorem Ipsum available <br> but the majority have </p>
<a href="service-details.html">Read More</a>
</div>
</div>
</div>
在<h3>标签内的上述代码中,我需要显示标题,在<p>标签中我需要显示描述。
另外,在阅读更多内容时,我需要提供该帖子的详细信息页面链接。
【问题讨论】:
-
以上都没有帮助。它只显示当前页面标题。我用
<?php echo get_the_title(); ?>请澄清