fix for categories not displayed

minor edit - if condition should be on page.categories & not on post.categories