Get Page Link or Home URL in WordPress
<?php echo get_page_link(); // outputs http://example.com/ ?> <?php echo home_url(); // outputs http://example.com/blog/ if WordPress is installed within 'blog' directory ?>