Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #208720

    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?

    #208860

    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">  &rarr;</span></a></div>';
    }
    return $current_post;
    }
    

    Best regards,
    Peter

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Set post length in 'Archive'’ is closed to new replies.