WordPress Getting the Home URL


Example

home_url() is used for retrieving the current site home url.

<?php echo esc_url( home_url( '/' ) ) ); ?>

Output

http://www.example.com