Hello,
i want to decrease the length of excerpts to my posts. I have applied many php codes on functions.php, but they don’t work.
I use advanced layout builder and i have selected from Content Elements (Blog Posts). More information for (Blog Posts) – Blog Style (Grid Layout), Define Blog Grid layout (Title and Excerpt).
Which is right php code to decrease Excerpt Length?
Thank you.
Hello,
any idea for that?
Thank you
Hi,
Please add following code to Functions.php file in Appearance > Editor
add_filter('avf_postgrid_excerpt_length','avia_change_postgrid_excerpt_length', 10, 1);
function avia_change_postgrid_excerpt_length($length)
{
$length = 100;
return $length;
}
Best regards,
Yigit
Hello Yigit,
sorry that doesn’t work for me. I want to decrease the length of excerpt in that page *(News). I want to have a max length of excerpts. If you have write more than 15 words, don’t show the other words.
Thank you
Hey!
Have you tried the code as following?
add_filter('avf_postgrid_excerpt_length','avia_change_postgrid_excerpt_length', 10, 1);
function avia_change_postgrid_excerpt_length($length)
{
$length = 15;
return $length;
}
Cheers!
Yigit
Hi,
Please post us your login credentials (in the “private data” field), so we can take a look at your backend.
Login credentials include:
Best regards,
Yigit
Hello,
i have done. Close it.
Thank you.
Hi! We’re glad that the solution worked for you.
Please let us know here in the forums if you need help with anything else.
Best regards,
Sarah
Hello,
thank you for your help. Close it.