// build the url from whatever data we already have on the page. var feedsrc = "http://www.bayeast.org/frontpage/feed"; // Load the feeds api from google google.load("feeds", "1"); // this function is run when google has loaded everything it needs using the setOnLoadCallback below function GetFeed() { // define the feed var feed = new google.feeds.Feed(feedsrc); // set how many entries we want to load feed.setNumEntries(10); // load the entries feed.load(function(result) { // if there were no errors, continue if (!result.error) { // loop through each entry in the feed for (var i = 0; i < result.feed.entries.length; i++) { var entry = result.feed.entries[i]; // Example output - this is where we start customizing the output $('#feed').append('

' + entry.title + '

'); $('#feed').append(entry.contentSnippet + '
'); $('#feed').append('
'); /* All data available for each entry: [string] entry.title [string] entry.author [string] entry.publishedDate [array] entry.categories [string] entry.content [string] entry.contentSnippet [string] entry.link */ } } else { console.log('error'); } }); } // once google has everything it needs, this will fire - we are // telling it to run the GetFeed() function google.setOnLoadCallback(GetFeed);