added conditional statement to posts assigned to the page category