Length of Post Excerpt
Can the length of the wp post excerpt be adjusted anyhow? I would like to have it around 3/5 as long as it is in default. If not, please add this option in one of the next releases.
And I've found a bug -> If I try to change the styling of "Post Title" and "Post Excerpt" via the builder, it interprets the placeholders as normal text without pulling the content anymore.
-
Official comment
Took me a while to figue what you meant...
You can limit the length of the excerpt in WP, thats no a brizy thing, Usually it's set to 55 characters, but you can narrow it down, just add this code into your themes function php:that would limit the length to 20 characters. if you want more - just change the 20 in th 2nd line with whatever you want :)
function custom_excerpt_length( $length ) { return 20; } add_filter( 'excerpt_length', 'custom_excerpt_length', 999 ); -
Works like a charm. Thanks a lot! Next time I will try to be more specific with my description. :)
1 -
Thank you @chris bernecker. I used the code successfully. On my page, though, the number reflects the word count, not the character count. Just something for others to consider if they're seeing this later on. Thanks again!
0 -
Thanks. I figured out using "Insert Read More Tag" in the post itself will have a better control on how I want the excerpt to end.
0
Please sign in to leave a comment.
Comments
4 comments