Added post_init hook, separated pages and posts