I would like to show excerpts in my archives page instead of the full articles. I’ve tried making manual excerpts, but they don’t show up in ‘archive’. Even though settings > Reading is set to ‘show experts’ for every post in the feed. Also tried pasting the excerpt_length function into functions.php and functions-enfold.php which didn’t work. Is there another way?
Hey graphicsplus!
Please insert following code into the functions.php file
add_filter( 'post-format-standard', 'avia_category_content_filter', 15, 1);
function avia_category_content_filter($current_post)
{
if(is_archive())
{
$current_post['content'] = get_the_excerpt();
$current_post['content'] .= $current_post['content'].'<div class="read-more-link"><a href="'.get_permalink().'" class="more-link">'.__('Read more','avia_framework').'<span class="more-link-arrow"> →</span></a></div>';
}
return $current_post;
}
Best regards,
Peter