Excerpt Length Limit, Manual and Automatic
-
I’m using the following code to change my excerpt:
function new_excerpt_length($length) { return 45; } add_filter('excerpt_length', 'new_excerpt_length'); function new_excerpt_more($excerpt) { return str_replace('[...]', '<span>...</span><div class="excerpt-more"><a href="'.get_permalink().'">Read more »</a></div>', $excerpt); } add_filter('excerpt_more', 'new_excerpt_more');
This works perfectly for auto-generating an excerpt. But if I enter an excerpt manually for a post, this code does nothing.
Any advice on how I can get this same result for manually entered posts as well?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Excerpt Length Limit, Manual and Automatic’ is closed to new replies.