Added global template tags (wp_main), added search results pagination (when needed).