babyewok Posted June 14, 2010 Share Posted June 14, 2010 Hi,I want to use the RSS block mpdule to show latest posts from my Wordpress blog. So far, it only shows the title which links to the relevant post - how do I get it to show a 'teaser' excerpt of the post itself? Link to comment Share on other sites More sharing options...
rocky Posted June 15, 2010 Share Posted June 15, 2010 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 More sharing options...
babyewok Posted June 15, 2010 Author Share Posted June 15, 2010 Thanks - I'll give it a try! Link to comment Share on other sites More sharing options...
babyewok Posted June 16, 2010 Author Share Posted June 16, 2010 No, it didn't work, unfortunately - I still just get the title of the post. Any other ideas? Link to comment Share on other sites More sharing options...
rocky Posted June 16, 2010 Share Posted June 16, 2010 Sorry. If that doesn't work, I don't know what will. Link to comment Share on other sites More sharing options...
babyewok Posted June 17, 2010 Author Share Posted June 17, 2010 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 More sharing options...
zwacklmann Posted December 8, 2010 Share Posted December 8, 2010 Woohoo! in deed.Thank you guys for this useful thread! Link to comment Share on other sites More sharing options...
dambie Posted June 22, 2011 Share Posted June 22, 2011 How get date from wordpress rss ? 'date' => date("d-m-Y", ($item->pubDate)) Link to comment Share on other sites More sharing options...
Kstyle001 Posted July 10, 2014 Share Posted July 10, 2014 Bump, Have problems showing the feed in the 1.6 version. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now