Bug fix when post_type is not page.