get_home_url(); and home_url(); functions is used to get home url in WordPress.
// Example to get home url
$url = home_url();
echo $url;
// Output: https://example.com
// Example to get url of any page using slug
$url = home_url().'/about';
echo $url;
// Output: https://example.com/about
Learn more about the similar topics:
| Tutorials |
| No Content Found. |
| Exercises & Assignments |
| No Content Found. |
| Interview Questions & Answers |
| No Content Found. |