Refactored all the files so that only blog related pages show the sidebar. Also fixed the sidebar so now it shows the categories of blog's posts.