Tagged: excerpt
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!
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
Hi Elliott!
That did the trick! Thank you so much!