/ Published in: PHP
You can just re-write the excerpt function in your theme functions file...
ust change this line...
array_push($words, '[...]');
You can also change the character limit here...
$excerpt_length = apply_filters('excerpt_length', 55);
ust change this line...
array_push($words, '[...]');
You can also change the character limit here...
$excerpt_length = apply_filters('excerpt_length', 55);
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function wp_new_excerpt($text) { if ($text == '') { $text = get_the_content(''); $text = strip_shortcodes( $text ); $text = apply_filters('the_content', $text); $excerpt_length = apply_filters('excerpt_length', 55); } } return $text; } remove_filter('get_the_excerpt', 'wp_trim_excerpt'); add_filter('get_the_excerpt', 'wp_new_excerpt');