The MU forums have moved to WordPress.org

Adding Text to all footers (7 posts)

  1. MrLister
    Member
    Posted 17 years ago #

    What's the easiest way to add a line of HTML code to all footers on the whole site?

  2. dsader
    Member
    Posted 17 years ago #

    Themes must have a <?php do_action('wp_footer'); ?> somewhere(usually footer.php).
    Make your own footer mu-plugin
    <?php
    /*
    Plugin Name: WPMU Footer
    Plugin URI: http://www.domain.org
    Description: Adds a footer to every theme, site-wide(Replace YOUR HTML GOES HERE).
    Author: You
    Version: 1.0
    Author URI: http://blog.domain.org
    */
    function wpmu_footer($blah)
    {
    echo 'YOUR HTML GOES HERE';
    return $blah;
    }
    add_action('wp_footer', 'wpmu_footer');
    ?>

  3. MrLister
    Member
    Posted 17 years ago #

    Works great, thank you!

  4. Trent
    Member
    Posted 17 years ago #

    That is great! Thanks for sharing!

  5. newquest
    Member
    Posted 17 years ago #

    Yes, this is a great plugin.

    However, is there anyway to code the main theme so that the footer does not show up on the main page?

  6. demonicume
    Member
    Posted 17 years ago #

    you could always just comment out the the footer.

  7. Ovidiu
    Member
    Posted 17 years ago #

    or include an if statement something like if blog_id ! = 1 insert footer so it will not be inserted on the main blog.

About this Topic