WordPress.org

Ready to get started?Download WordPress

Forums

Full-text feed and the <!--more--> tag (2 posts)

  1. tamjl
    Member
    Posted 7 years ago #

    Hi there -- I've got my WordPress feed set to full-text, but it's not syndicating that way. It appears that whenever I use the <!--more--> tag in a post, the RSS feed is only partial. So, my question is this:

    Is there a way to send out a full-text feed and still have only partial posts or excerpts on my blog's home page? I like the partial post on the home page so that visitors can quickly scroll through a lot of recent posts rather than scroll down through entire long posts.

    Thanks!

  2. Cacturion
    Member
    Posted 7 years ago #

    It took me a long time to figure this one out, it is actually easier than it seems.

    Open up wp-includes/post-template.php

    Find the line that reads (it's inside the function named get_the_content):

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

    And change it into this:

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

    And now you have partial posts on home page and a full feed!

Topic Closed

This topic has been closed to new replies.

About this Topic