The home_url template tag retrieves the home URL of your WordPress current site. If you want to hardcode link to your homepage anywhere in your custom WordPress theme you can use the snippet below to add link to your WordPress website homepage.
Add this WordPress snippet to get Home Page URL
<?php echo get_home_url(); ?>
<a href="<?php echo get_home_url(); ?>" title="Your Home Page Title" rel="bookmark">Home</a>
The WordPress snippet above will output: https://www.example.com with the domain and the schema matching your settings and website.
If you want to recieve the latest WordPress snippets, tutorials, tricks and useful information about web development, seo, social media marketing, google you can Subscribe to our newsletter. All you need to do is to fill the Subscribe form below, verify your Free Subscription in your email and start read our daily useful tips and tricks straight in your mailbox.
Note* we hate spam and our newsletter is powered by Google Feedburner and you will not get spam messages in your mailbox.