I'm adding in a "Hosted by..." bit in the Tarski footer for WPMU users, and I'm running into a missing tag.
I can use get_site_option('site_name') to get the overall site name (not the individual blog, but the hosting WPMU install), but there's no eqivalent site_url one.
What's the best way of doing this? I'd rather not query the database to see what the first blog's URL is...
mysorehead
Member
Posted 18 years ago #
I just made my own template tag as a plugin with the site name and url hard coded. Can use it anywhere.
Richard
We discuss this a few weeks ago. Take a look at the two default themes in their footers as I believe Donncha did an example of this.
(Can't pull up an additional window here so I can't check)
I can't believe I didn't think to check that, drmike - thanks!.
$current_site = get_current_site();
echo '<a href="http://' . $current_site->domain . $current_site->path . '">' . $current_site->site_name . '</a>';
Works like a charm.
For some reason this doesn't work for me. I have a subdomain setup.
When I use this "$current_site->path " All I get is the topdomain. not the subdomains...
Any suggestions why this happens?
Cheers,
joakim
This thread is discussing the top level domain, not the individual subdomains. Get_current_site pulls the master site.
You want get_option('blogurl') I believe. Someone check that for me please.
lunabyte
Member
Posted 17 years ago #
<a href="<?php bloginfo('home'); ?>" title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?></a>
or:
bloginfo('url')
works as well.