Now it doesn’t give an error, but is still not working. My vesion is greater than 5.3.
Where should I notice the limit? In the subheading box, in the WordPress backend, accepting only five words? Or maybe it should let me write as many words as I want and later, in the frontend, show only the first five words?
Thanks again!
I’m sorry, I don’t know almost nothing about PHP. What shoud I do with this code? Just paste it in function.php? I’ve tried pasting this at the top of the file, but gives me error.
<?php add_filter( 'subheading', function( $value ) {
return wp_trim_words( $value, 5 );
} ); ?>
Parse error: syntax error, unexpected T_FUNCTION in (…)/functions.php on line 1
Thanks in advance!
Nobody can help? I can’t understand why it isn’t working. Is it impossible to set an horizontal cropped featured image?
Is there any way to stablish a lenght limit by characters?
Thank you