0

I recently launched a new WordPress site and implemented the theme "twentyeleven." I also created a twentyeleven-child folder and activated it.

I would like to replace the words "Proudly powered by WordPress" at the bottom of the page with a custom footer. I found the appropriate file and can easily make the replacement. However, there's some code that I don't understand.

Suppose my footer consisted of nothing more than image - footer.png. Should I just delete everything inside div id="site-generator" and replace it with footer.png. Or is there some code inside the div that I should keep for some reason?

I assume I should keep the line get_sidebar( 'footer' ); though I haven't really taken a look at the footer sidebar yet.

<footer id="colophon" role="contentinfo">

        <?php
            /*
             * A sidebar in the footer? Yep. You can customize
             * your footer with three columns of widgets.
             */
            if ( ! is_404() )
                get_sidebar( 'footer' );
        ?>

        <div id="site-generator">
            <?php do_action( 'twentyeleven_credits' ); ?>
            <a href="<?php echo esc_url( __( 'https://wordpress.org/',   'twentyeleven' ) ); ?>" title="<?php esc_attr_e( 'Semantic Personal   Publishing Platform', 'twentyeleven' ); ?>"><?php printf( __( 'Proudly   powered by %s', 'twentyeleven' ), 'WordPress' ); ?></a>
        </div>
</footer><!-- #colophon -->
2

There's one line that you can remove. This is the line below

Your code will look something like this:

    <?php
        /*
         * A sidebar in the footer? Yep. You can customize
         * your footer with three columns of widgets.
         */
        if ( ! is_404() )
            get_sidebar( 'footer' );
    ?>

    <div id="site-generator">
        <?php do_action( 'twentyeleven_credits' ); ?>
        <img src="footer.png" />
    </div>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.