on an asp.net-mvc website page, i want to show recent blog posts from a wordpress blog.
Similar to this site, i want to show the last few updates of a particular wordpress blog on my website. kind of like what google reader does i guess, but just for one site and for long posts it should only show a little and have a “click for more” link.
is that something I subscribe on the server and return the html or is it something i should be doing on the client side with jquery ??
Since WordPress provides rss feeds you can use them to get the latest posts. The feed is located at http://yourblog.com/feed.
Parsing this feed is a simple task thanks to SyndicationFeed class. Here’s an example:
Limiting the posts is a trivial task. Check the length of the text and if it’s longer than your threshold, use
string.Substring(0, <limit>)
to cut it.