How to use WP_query(), query_posts() and pre_get_posts in WordPress Programming