I’m trying to limit the amount of words in the excerpt section of my post slider. The goal is to have the posts displayed as 3 columns of equal height.
I tried all solutions I found here. Editing this didn’t work:
$prepare_excerpt = !empty($entry->post_excerpt) ? $entry->post_excerpt : avia_backend_truncate($entry->post_content, apply_filters( ‘avf_postgrid_excerpt_length’ , 20) , apply_filters( ‘avf_postgrid_excerpt_delimiter’ , ” “), “…”, true, ”);
and adding this to functions.php didn’t work either:
add_filter(‘avf_postgrid_excerpt_length’,’avia_change_excerpt_length’,10,1);
function avia_change_excerpt_length()
{
return 10;
}
As those solutions were both quite old, I’m guessing they may not be accurate with the latest version of enfold.
Where should I edit this?
Hey lpongo,
Thank you for using Enfold.
Did you set the content to Title and Excerpt? The code you posted above should be enough:
add_filter('avf_postgrid_excerpt_length','avf_postgrid_excerpt_length_mod', 10, 1);
function avf_postgrid_excerpt_length_mod($length) {
$length = 10;
return $length;
}
If it’s not working, please post the login details here so that we can check the site.
Best regards,
Ismael