WP Snipp Ninja

How to get Home page link?

Author: WordPress Snippets | Posted on: June 3, 2018 |

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.

About the Author

 WordPress Snippets

Hello my name is Dimitar Krumov I am from Sofia Bulgaria but live in Varna on the Black Sea coast.I am a Web Developer since 2002 working in different Web Projects most of them are international and business-related. Some of my knowledge and skills but not limited to WordPress, HTML, CSS, Google Stack, Analytics, SEO and more..

Follow WordPress Snippets on Social Media

Leave a Reply

Your email address will not be published. Required fields are marked *