Tutorial by Examples

home_url() is used for retrieving the current site home url. <?php echo esc_url( home_url( '/' ) ) ); ?> Output http://www.example.com
Returns the ‘site_url’ option with the appropriate protocol (https://) <?php echo site_url(); ?> Output http://www.example.com

Page 1 of 1