/ Published in: PHP

Thanks to LenK on the WP forums.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
remove_filter('get_the_excerpt', 'wp_trim_excerpt'); add_filter('get_the_excerpt', 'custom_trim_excerpt'); function custom_trim_excerpt($text) { // Fakes an excerpt if needed global $post; if ( '' == $text ) { $text = get_the_content(''); $text = apply_filters('the_content', $text); $excerpt_length = x; } } return $text; }
URL: http://wordpress.org/support/topic/227692
Comments
