Support » Networking WordPress » With a multisite setting, how to customize the footer of each site?

  • Resolved Aria


    Hi everyone,

    * A multisite for a multilingual site
    I am currently doing local tests with a multisite WordPress – multisite because there are different languages (English, Spanish, French).
    Since it is a local installation, I use sub-directories, not sub-domains, for instance :

    • /blog/ for English (root site)
    • /es/ for Spanish
    • /fr/ for French.

    * Customize the footer
    I’ve created a child theme (.css) from Twenty Ten, and didn’t changed the template (.php) that much, just add a splash page for each site and a special footer. As you might know, some WP-themes provide the possibility to customize the footer, but it’s not the case here with Twenty Ten Theme – unless I use the widgets, but I want to have the control over each footer.

    What do I mean by customization? I actually want to add special texts and different images for each site/langage, a newsletter box, etc.
    Here is an exemple of footer-english.php (the real content of the site isn’t fixed yet) :

    * Custom footer for the English site
        </div><!-- #main -->
        </div><!-- #wrapper -->
        <div id="footer" role="contentinfo">
            <div id="colophon">
                <div id="site-info">
                <a href="<?php bloginfo('url'); ?>"><?php bloginfo('name'); ?></a>
                <?php bloginfo('description'); ?>
                - <?php echo date('Y'); ?>
                </div><!-- #site-info -->
            </div><!-- #colophon -->
                        <div id="socialfooter"><span>Thewebsitename - Footer English</span>
    <p id="definition">Some text in each language. This time, I write in English, but I would like to display a text in Spanish (hola mi amor) for the Spanish website, and in French (bonjour communauté WP) for the French website. How cool you are guys to give it a try and help me!</p>
                    <li><a href="#"><img src="" alt="Newsletter" height="24" width="24" /> Newsletter</a></li>
                    <li><a href="#"><img src="" alt="RSS" height="24" width="24" /> RSS</a></li>
                    <li><a href="#"><img src="" alt="Facebook"  /> Facebook</a></li>
                </div><!-- #socialfooter -->
        </div><!-- #footer -->
        /* Always have wp_footer() just before the closing </body>
        * tag of your theme, or you will break many plugins, which
        * generally use this hook to reference JavaScript files.

    * My efforts so far…
    I’ve seen there are many WP plugins or trick to customize the template, per-post, per-page, per-category, per-tag.
    I’ve already took a look at this tuturial for example, but it’s not for Multisite WP.
    But this time, the issue is I would like a custom footer per-site.

    I assume there is something to do with the ID of each site (I don’t know yet how to get it, but it’s pretty easy), and link it to a conditional tag, something like :

    • if English, get footer-english
    • elseif Spanish, get footer-spanish
    • and so on

    But I’m infortunately not good enough at php to do that alone.

    * Any clue?
    Any idea how I could do that? I would like to do it for once, or at least reduce to minimum the selection from the WP dashboard.

    Thanks a lot!

Viewing 3 replies - 1 through 3 (of 3 total)
  • One way to do this would be to create multiple versions of your theme, each with the footer customisations you need, and upload them with different names (folder names, and identification information in style.css).

    Then you could set the individual sites to use the appropriate themes.

    Hi DGilmour,

    Thank you for your tip.

    I actually don’t want to customize the CSS/theme (which is a child theme from Twenty Ten) of each site, but customize a part of the template in a certain way : the footer.php

    I have found a plugin “Header and Footer” which does partly the job, and hacking up the original template, I don’t need to multiply all the files, I just have to create a different footer for each language, and add a line of php from the admin/dashboard of each site, and that’s it, It works!

    <?php get_footer('english'); ?>
    <?php get_footer('spanish'); ?>
    <?php get_footer('french'); ?>

    Hi Aria
    Can you explain me how you solved your issue with multi language footer. Because I don’t understand. Can you write me step by step what you do in plugin footer and header and where you put different foter and what did you call them and the last where you add this line of php? Sorry but I’m new in WordPress and reale need help.
    I will be very grateful.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘With a multisite setting, how to customize the footer of each site?’ is closed to new replies.