I really need help! The the_content_rss has stoped working (12 posts)

  1. Steven
    Posted 6 years ago #

    I'm running on WP 2.5.1.
    A few days ago the the_content_rss was working fine displaying text. Now it has stoped displaying text in all my templates.

    I have no clue why. Example usage is this:
    the_content_rss('Les mer','', '', 30);

    I'm soon going live with my site and really need help figuring this out.

  2. Steven
    Posted 6 years ago #

    Can anyone help me please?

    Is there another way of showing the first 20 characters of a post?
    I'm not planning on using Excerpt.

    Really need some help here guys.

  3. Steven
    Posted 6 years ago #


  4. Steven
    Posted 6 years ago #

    After some digging around, I went to the source.
    the_content_rss function is loacted in the /wp-include/feed.php.

    The code is as follows:

    function the_content_rss($more_link_text='(more...)', $stripteaser=0, $more_file='', $cut = 0, $encode_html = 0) {
    	$content = get_the_content($more_link_text, $stripteaser, $more_file);
    	$content = apply_filters('the_content_rss', $content);
    	if ( $cut && !$encode_html )
    		$encode_html = 2;
    	if ( 1== $encode_html ) {
    		$content = wp_specialchars($content);
    		$cut = 0;
    	} elseif ( 0 == $encode_html ) {
    		$content = make_url_footnote($content);
    	} elseif ( 2 == $encode_html ) {
    		$content = strip_tags($content);
    	if ( $cut ) {
    		$blah = explode(' ', $content);
    		if ( count($blah) > $cut ) {
    			$k = $cut;
    			$use_dotdotdot = 1;
    		} else {
    			$k = count($blah);
    			$use_dotdotdot = 0;
    		for ( $i=0; $i<$k; $i++ )
    			$excerpt .= $blah[$i].' ';
    		$excerpt .= ($use_dotdotdot) ? '...' : '';
    		$content = $excerpt;
    	$content = str_replace(']]>', ']]>', $content);
    	echo $content;

    I discovered that if I removed the line
    $content = apply_filters('the_content_rss', $content);
    it actually works.

    So the problem lies within the apply_filters function.

    Does anybody have any experience with the apply_filters function?

  5. Anonymous
    Posted 6 years ago #

    I had exactly the same problem after the update to 2.6. Deleted the line as well and now it works perfect again. Many thanks! But actually I do not know what the prurpose of the line was...


  6. Steven
    Posted 6 years ago #

    Right... now I updated to 2.6 and had forgotten this issue, until I search here again.

    Is there ANYONE that can make a statement regarding this issue?

    I will keep bumping this post until I get a sane answer.

  7. Steven
    Posted 6 years ago #

    Is this a bug?

  8. Steven
    Posted 6 years ago #

    It sure is quite in here.... I wonder if any moderators actually read this....

  9. Steven
    Posted 6 years ago #


  10. Steven
    Posted 6 years ago #

    Just upgraded to 2.7.

    Is this EVER gonna be fixed?

  11. tadhg
    Posted 6 years ago #

    No info on this, just wanted to point out that
    http://core.trac.wordpress.org/ticket/6847, which is about the same thing, was closed as invalid, I think because the person closing it didn't realize that it didn't work for Atom or RSS2 feeds--probably because of http://core.trac.wordpress.org/ticket/8706
    Also, there's another forum thread on the same topic:

    The patch submitted for 6847 might help you out; you could try it.

  12. dhirajkumar
    Posted 6 years ago #

    How to show latest blog topic on my website front page

    i have my blog located at website.com/blog/ and i want to show the last blog made on my homepage at website.com. How can i do this.

    Please help me. it's urgent .

Topic Closed

This topic has been closed to new replies.

About this Topic