WordPress Snippet: How to get Home page link

Get WordPress home page URL

The home_url template tag retrieves the home URL of your WordPress current site. If you want to hardcode link to you 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



The WordPress snippet above will output: https://www.example.com with the domain and the schema matching your settings and website.

Autor: wpsnipp | Modified: April 22, 2019 at 9:44 pm


Leave a Reply

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

Advertising

Related posts

What does the_content and get_the_content do in WordPress?

What does the_content and get_the_content do in WordPress?

The WordPress functions the_content and get_the_content are used to pull the main text area from the page or post. The difference between them …

Change The Color Of Wordpress Admin Dashboard Icon In The Menu

How to change Dash icon color in WordPress admin menu with CSS?

Change the default color for dash icon in the admin menu Probably you have this question when you create a Custom WordPress Theme …