$( document ).ready(function() { //console.log("obits js loaded"); //initObitLoad(); getLatestPerson(); }); function initObitLoad() { // var divHTML = "js load"; //obitSummary divHTML = buildBody(); $('#wboc-obits-widget').html(divHTML); } function buildBody(person) { console.log(person); var obitWidgetTitle = "Delmarva's Legacy"; var obitImageURL = person._embedded["wp:featuredmedia"][0].source_url;//"http://obituaries.wboc-digital.com/wp-content/uploads/2020/10/John-Henry-Peek.jpg"; var obitPersonName = person.title.rendered;//"John Henry Peek"; var obitPersonSummary = person.meta.story.substr(0,150)+"...";//"Salisbury – John Henry Peek, 92, of Salisbury died Monday October 12, 2020 at Coastal Hospice at the Lake. Born in Asheville, NC, he was the son of the late Rev Henry Peek and Geneva Peek."; var obitPersonLink = person.link;//"http://obituaries.wboc-digital.com/john-henry-peek/"; var theBody = '