Thread Starter
Steven
(@spstieng)
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.
Thread Starter
Steven
(@spstieng)
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?
841002
Hi,
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…
CHRISTOPH
Thread Starter
Steven
(@spstieng)
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.
Thread Starter
Steven
(@spstieng)
It sure is quite in here…. I wonder if any moderators actually read this….
Thread Starter
Steven
(@spstieng)
Just upgraded to 2.7.
Is this EVER gonna be fixed?
No info on this, just wanted to point out that
http://core.trac.ww.wp.xz.cn/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.ww.wp.xz.cn/ticket/8706
Also, there’s another forum thread on the same topic:
http://ww.wp.xz.cn/support/topic/165044.
The patch submitted for 6847 might help you out; you could try it.
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 .