RSS feed Question?

Discussion in 'WordPress' started by tdd1984, Feb 18, 2010.

  1. #1
    Hey guys how do I limit the word count through our Feed? For example, how do I set our RSS feed to only show maybe 150 words? In addition, how can I enable the HTML?
     
    tdd1984, Feb 18, 2010 IP
  2. nanosani

    nanosani Peon

    Messages:
    67
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    If you're using Wordpress then do the following:
    Go to Admin Panel --> Settings --> Reading
    Setting the feed reading to "Summary"
     
    nanosani, Feb 18, 2010 IP
  3. WPGLamour

    WPGLamour Active Member

    Messages:
    30
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    95
    #3
    Put this in your functions.php file:
    function limit_rss_words($content) {
    $word_limit = "10";
    $content = explode(' ', $content);
    return implode(' ', array_slice($content, 0, $word_limit));
    }
    add_filter('the_excerpt_rss', 'limit_rss_words');
    add_filter('the_content_rss', 'limit_rss_words');



    If you don't have a functions.php file then create it and ad the code above between <?php and ?>
     
    WPGLamour, Feb 19, 2010 IP