add if statement to blog page