диета при панкреатите

Make Your Full Text Feeds Actually Full Text

August 27, 2007 | Wordpress

When writing a lengthy post, there is a wonderful “quick tag” (<!––more––>) in WordPress that will allow you to shorten the portion of the post that is shown on the home page. This tag basically breaks a post into a teaser and content section. Anything before the tag will be displayed on your home page and a “Read More” link will be inserted where the <!––more––> is located.

Using this tag is a great way to avoid cluttering your home page, increase page views and avoid duplicate content problems with search engines. However, there is also a downside if you offer full text feeds. Starting with the 2.1 release, WordPress begain truncating the feed content anywhere a <!––more––> tag was used, instead of abiding by the option set in the feed preferences.

While this is still better than the default “Summary” feed option, it still essentially negates the option of offering a true full text feed. Thankfully, as with most things in WordPress, there are a couple of ways to solve this.

Edit Your Template Files
If your comfortable with editing your WordPress core files you can use this simple code edit to fix the problem. I must mention that before editing any of the core files you should make sure you have a back up.

Open the wp-includes/post-template.php file and look for the following line of code.

if ( preg_match('/<!--more(.+?)?-->/', $content, $matches) )

Replace that with this:

if ( preg_match('/<!--more(.+?)?-->/', $content, $matches) && !is_feed() )

That’s it! You should now have true full text feeds regardless of whether you use the <!––more––> tag or not.

The Easy (Plugin) Way
Of course, the easiest way would be to just use the Cavemonkey’s Full Text Feeds plugin. Just download, upload and activate. No code editing necessary. Plus, you won’t have worry about re-editing your file after upgrading to future releases.

Note: If you are reading this post through an RSS Reader, you should be seeing the entire post without a “Continue Reading…” link back to the article.

If you enjoyed reading Average Joe Blogger why not subscribe to my RSS Feed or get it delivered directly to your email inbox.

2 Responses to “Make Your Full Text Feeds Actually Full Text”

  1. MyAvatars 0.2 Ad Tracker |

    Good tip and thanks for changing your feed to “Full” it was getting annoying ;)

  2. MyAvatars 0.2 Nate (Average Joe Blogger) |

    I aim to please!