ionfish (owner)

Revisions

gist: 160798 Download_button fork
public
Description:
WordPress plugin to replace the contents of posts with their excerpts on index pages
Public Clone URL: git://gist.github.com/160798.git
Embed All Files: show embed
only_excerpts.php #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php
/*
Plugin Name: Only Excerpts
Plugin URI: http://tarskitheme.com/
Description: Replace the contents of posts with their excerpts on index pages.
Author: Benedict Eastaugh
Version: 1.0
Author URI: http://extralogical.net/
*/
 
function replace_post_with_excerpt($content) {
return has_excerpt() && !is_single() && !is_page()
? get_the_excerpt()
: $content;
}

add_filter('the_content', 'replace_post_with_excerpt', 9);

?>
Please log in to comment.