Created
September 20, 2012 03:52
-
-
Save claudiosanches/3753876 to your computer and use it in GitHub Desktop.
Force Excerpt in Feeds
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Force Excerpt in Feeds | |
* | |
* @param string $content Content of post | |
* | |
* @return string Excerpt of post | |
*/ | |
function cs_feed_force_excerpt( $content ) { | |
return get_the_excerpt(); | |
} | |
add_filter( 'the_content_feed', 'cs_feed_force_excerpt' ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment