你知道什么时候使用the_excerpt()
而且帖子上没有设置“摘录”,它会自动使用前50个字左右。
在使用get_the_excerpt()
例如,我正在使用get_the_excerpt()
像这样…
$return .= sprintf(\'
<li>
<div class="title"><a href="%1$s">%2$s</a><span class="goto">a</span></div>
<div class="project-description">%3$s</div>
</li>\',
get_permalink( get_the_ID() ),
get_the_title(),
get_the_excerpt()
);
但是,如果未设置摘录,则get_the_excerpt()
函数不显示回退(前50个左右的单词)。你知道怎么做吗?