
By: Ruben Marissen | Date: Feb 22 2012 12:50 | Format: PHP | Expires: never | Size: 926 B | Hits: 965
- <?php
- function improved_trim_excerpt($text) {
- global $post;
- if ( '' == $text ) {
- $text = get_the_content('');
- $text = apply_filters('the_content', $text);
- $excerpt_length = 80;
- }
- }
- return $text;
- }
- remove_filter('get_the_excerpt', 'wp_trim_excerpt');
- add_filter('get_the_excerpt', 'improved_trim_excerpt');
- ?>
Latest pastes
2 hours ago
4 days ago
6 days ago
8 days ago
8 days ago