Doing a console.log instead of an error message for the posts ajax - also making sure that console.log is defined