We have a website that is using the Blog Post Slider element on the home page with it set to display the post excerpt of only the most recent post. The most recent excerpt isn’t showing the excerpt for some reason. We’ve confirmed the post categories are set correctly on both the blog itself and the slider.
Also, how can we set the length of the excerpt so it includes the entire excerpt instead of cutting it off?
In the private section is the website and the functions.php script we are currently using. Your help is appreciated.
UPDATE: We figured out the problem with the post excerpt not showing was due to a plugin. I would be interested in knowing how to set the excerpt length in the functions file, though, if you could please share that with me. Thanks.
Hi GWS,
We are happy to hear that :)
You can change the excerpt length of the post slider using this code (just change the value as you see fit):
function custom_postgrid_excerpt_length($excerpt_length) {
$excerpt_length = 20;
return $excerpt_length;
}
add_filter( 'avf_postgrid_excerpt_length', 'custom_postgrid_excerpt_length');
Best regards,
Nikko
Thank you, Nikko!
Hi,
Great, I’m glad that Nikko could help you out. Please let us know if you should need any further help on the topic, or if we can close it.
Best regards,
Rikard
We are good now. Please close the ticket. Thanks.
Hi GWS,
We’re glad to hear that :)
Thanks for using Enfold and have a great day!
Best regards,
Nikko