Jump to content

[SOLVED] RSS Block module - show post excerpt


Recommended Posts

Try changing line 107 of modules/blockrss/blockrss.php from:

$rss_links[] = array('title' => $item->title, 'url' => $item->link);



to:

$rss_links[] = array('title' => $item->title, 'url' => $item->link, 'content' => $item->getContent());



Then adding the following to modules/blockrss/blockrss.tpl:

{$rss_link.content|truncate:35}

Link to comment
Share on other sites

Woohoo! I got it working!!

Before I tried your suggestion, I had already tried:

$rss_links[] = array('title' => $item->title, 'url' => $item->link, 'content' => $item->description); 



When neither that or your suggestion worked, I went to my wordpress files and FINALLY found one of the files dealing with RSS and it uses 'content' not description, so I change dthe line ot read:

$rss_links[] = array('title' => $item->title, 'url' => $item->link, 'content' => $item->content); 



Et voila!! It now works. I used the same code that you suggested for the tpl file to truncate the post to just a few words.

Would be handy if the block rss module had this option built in....

Link to comment
Share on other sites

  • 5 months later...
  • 6 months later...
  • 3 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...