added ifCond helper + refactored latestPosts helper