get_home_url() just returns current URL

url, wordpress, wordpress-theming

Solution

It's just home_url(). So:

echo home_url();

Will output the homepage of your Wordpress installation.

Problem

My problem is simple, I need a "home" link for my WP template, and the function `get_home_url()` is simply returning the current url. So if I'm on `"example.com/?cat=2"`, that's the url I get for my home button . Any ideas what I'm doing wrong? I'm pulling my hair out.

Original source