multisite with dynamic footer.php; same theme
-
I have few blogs running on a single multisite install, and want to use the same theme for all of them.
The catch: I want to vary the footer.php depending on what blog is being accessed.
i.e., if blog123 is accessed, one set of footer info/links is displayed, if blog 234 is accessed, another set is displayed, etc…
I assume the syntax would be similar to the conditional tags needed for the meta robots in the header (like below)
<?php if(is_single() || is_page() || is_home() || is_category()) { ?> <meta name="robots" content="index,follow,noodp" /> <?php } else { ?> <meta name="robots" content="noindex,noarchive,follow,noodp" /> <?php } ?>but am unsure how to single out a single blog id or domain.
tks.
-
You used to be able to edit the footer under Appearance > Footer for each individual blog, this seems to have been removed – at least by default. I’ll let you know if I find a solution.
mcfd90, that depends on the theme, I think.
To the original question, I think you could use
$current_sitesomehow.Or better, use get_current_site()
Thanks ipstenu.
The Super Admin is still allowed to modify them for users otherwise I was going to make the footer a sidebar like in twentyten… I’ll try that.
I think I’d just widgetize the footer.
bdoreste I had been going to suggest using bloginfo(‘name’); but get_current_site() is much better (as names can be changed by the user).
Many thanks Andrea_r and ipstenu. So I’m not thread hijacking I’ve moved here.
mcfd90, thanks for the response!
I ended up using
get_bloginfo('url')with a series of if statements, but will try implementingget_current_site()instead.thanks again!
Get current site referrs to the *network* name, not the site. In the code sites are blogs, the network is a site.
get_current_site() will always return your main domain, unless you have multiple networks.
The topic ‘multisite with dynamic footer.php; same theme’ is closed to new replies.