Return to Snippet

Revision: 42527
at March 6, 2011 10:47 by crypticsoft

Initial Code
		type: "GET",
		url: "/blog/feed",
		dataType: "xml",
		success: function(xml) {

			var contain = $("div.panel ul");
			var limit = 5;
			if( index < limit ){
				var title = $(this).find('title').text();
				var url = $(this).find('link').text();
				var pubDate = $(this).find('pubDate').text();
				$('<li></li>').html('<a href="'+url+'">'+title+'</a>').appendTo(contain);

			});//end each

Initial URL

Initial Description
* Set your local path to the wordpress install, in my case was: "/blog/feed"
* Edit the var contain = make it set to the selector, in my case I'm populated a list tag <ul></ul>.
* Edit the var limit = 5; Set the amount of blog posts you want to display.

Initial Title
parse wordpress RSS feed using ajax / jquery

Initial Tags

Initial Language