refactor blog post type query to blog_post_type private method