0

I’m trying to shorten the content of my RSS feed. Right now it displays way, way too much for each entry and I’ve tried to select the “Excerpt” in the Syndications setting in my option panel but it hasn’t done anything.

I’ve tried different approaches but little has it helped.

Is there a simple way (possible add_filter) where I can set the RSS feed content length to, say, 200?

Thanks
- Mestika

0

I usualy make a RSS feed in my template. Just copy the RSS feed you have in the wp-include/feed-rss2.php
Step two is registering it instead of the original:

// override feeds
function own_rss( $for_comments ) {
    //it is in my theme/feed/rss2.php
    $rss_template = get_stylesheet_directory() . '/feed/rss2.php';
    if( file_exists( $rss_template ) ) {
        load_template( $rss_template );
    } else {
        do_feed_rss2( $for_comments ); // Call default function
    }
}
remove_all_actions( 'do_feed_rss2' );
add_action( 'do_feed_rss2', 'own_rss', 10, 1 );

Step three is adjusting the your own RSS to your needs.

also look at this: http://codex.wordpress.org/Customizing_Feeds

|improve this answer|||||
0

I get it to work - it was simply because my Excerpt length wasn't correct and because I'm using my own "shoren" function and not the excerpt on my blog. Now it works fine..

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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