made textCounter a function in the JS file
removed recaptcha check from getPosts function