ionfish (owner)

Revisions

gist: 160794 Download_button fork
public
Description:
WordPress plugin to show excerpts at the top of each post
Public Clone URL: git://gist.github.com/160794.git
Embed All Files: show embed
display_excerpts.php #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php
/*
Plugin Name: Display Excerpts
Plugin URI: http://tarskitheme.com/
Description: Show post excerpts at the top of each post.
Author: Benedict Eastaugh
Version: 1.0
Author URI: http://extralogical.net/
*/
 
function add_excerpts_to_posts($content) {
$excerpt = has_excerpt()
? sprintf("<div class=\"excerpt\">\n\n%s\n\n</div>", get_the_excerpt())
: '';

return $excerpt . $content;
}

add_filter('the_content', 'add_excerpts_to_posts', 9);
 
?>
Please log in to comment.