fixed excerpt if statement and added permalink to post titles