Wordpress more tag and full feeds

January 27, 2007 by martin  
Filed under blogs

If you use the more tag in your articles in Wordpress to cut off the article you might have noticed that the feeds get cut off at the same position even though you selected to provide full feeds of your articles. There is no obvious way to change this behavior and it took some time until I found the solution to this problem.

You will have to edit the file post-template.php in wp-includes. Open the file and search for the following string

if ( preg_match('//’, $content, $matches) ) {

in get the content and change it to

if ( preg_match('//’, $content, $matches) && !is_feed() ) {

That is it. You have full feeds now and the more tag works as intended as well.

Comments

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!