fix bug with only enqueuing script on posts