Add if statement to articles and pages.