I want a function which gets a url of the website. Similar to this one: <?php bloginfo('template_directory') ?>
But instead takes me to the URL of the website, so I can use it to link my homepage to the home button.
If there is a better way of how to link the home button just let me know.
Ryan
You can also use
<?php echo get_option('home'); ?>
Use
get_home_url()
:Almost all other WordPress environment info can be fetched through the
get_bloginfo()
function.This is a late answer but as an alternative method, you can use this:
I use this code for the site url from the [WordPress Codex][1]