• 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.

Viewing 7 replies - 1 through 7 (of 7 total)
  • 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.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    mcfd90, that depends on the theme, I think.

    To the original question, I think you could use $current_site somehow.

    Or better, use get_current_site()

    https://codex.www.ads-software.com/WPMU_Functions/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.

    Thread Starter bdoreste

    (@bdoreste)

    mcfd90, thanks for the response!

    I ended up using get_bloginfo('url') with a series of if statements, but will try implementing get_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.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘multisite with dynamic footer.php; same theme’ is closed to new replies.