Tagged: 

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #345779

    Hello,

    I’m using Enfold with a child theme. Currently when I view posts by category (not my home/index page), the theme displays the posts’ content in their entirety but I’d like it to display only post excerpts, either by a set number of words or a more tag.

    Because of the large number of posts I have, it’s not efficient for me to add more tags to each post.

    I’ve seen a couple posts that are similar to what I’m asking but I struggle to understand the solutions offered and none of those posts had anything about using child themes, so I wanted to ask here to make sure I’m doing things right.

    Thanks in advance for any help!

    #346112

    Hey sasusc!

    Try opening up /enfold/includes/loop-index.php and on line 55 you should see this,

    $current_post['content'] = str_replace(']]>', ']]>', apply_filters('the_content', $current_post['content'] ));
    

    Add this on the next line,

    if (is_archive()){ $current_post['content'] = get_the_excerpt($post->ID); }
    

    Regards,
    Elliott

    #346357

    Hi Elliott!

    That did the trick! Thank you so much!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘How to display post excerpts instead of full post contents’ is closed to new replies.