WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a WordPress installation that sometimes uses long and lengthy posts delimited by the <!--more--> tag. However on my RSS feeds, the entire post is shown.

Is there a way, aside from custom tags, to delimit how much is shown in a WordPress Feed or just show enough until the "More" tag?

share|improve this question
up vote 1 down vote accepted

You can select between Full text and Summary in the Reading settings:

settings menu


If you select the Summary, then

a) To control the number of words in the feed summary you can use:

function custom_excerpt_length( $num_words ){
    return 30; // number of words to show

The default number of words in the summary is 55.

b) If you want to use <!--more--> in the post content to define the feed summary, you can use the following:

add_filter( 'the_content', 'custom_content_feed' );
function custom_content_feed( $content ){
    if( is_feed() ){
        // <!--more--> used in the post content: 
        if( strpos( $content, '<span id="more-') !== FALSE ){
            // remove the excerpt length limit
            add_filter( 'excerpt_length', 'custom_long_excerpt_length' ); 
            // get the content before <!--more-->
            $content = stristr( $content, '<span id="more-', TRUE );
            // add the default 'read more' symbols at the end:
            $excerpt_more = apply_filters( 'excerpt_more', ' ' . '[&hellip;]' );
            $content .= $excerpt_more;
    return $content;
function custom_long_excerpt_length( $num_words ){
    return 99999;

c) You can also use a) and b) together.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.