set var for posts and fix closing tag