最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

get_the_excerpt only returns one excerpt

programmeradmin0浏览0评论

Just starting with WP and my inexperience is completely showing. When I use the function get_the_excerpt(), it only returns one excerpt for the most recent blog post, and not the other ones.

I am using a theme, so trying to work with what is already here. Here is the code in the theme-shortcodes:

if ($excerpt == '1' || ($first && $excerpt == 'featured')) {
    $output .= '<div class="post-excerpt">'. get_the_excerpt() .'</div>';
}

And my output code:

$output .= '<div class="post-excerpt">'. get_the_excerpt() .'</div>';

How can I make the excerpts show for all my blog posts?

I would be grateful for any help or any point in the right direction - thanks!

发布评论

评论列表(0)

  1. 暂无评论