Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am using Wordpress 2013 theme as a starting point for a new theme from scratch.

Under my themes folder, my footer.php theme looks like this. (Notice the final functionwp_footer().

    </div><!-- #main -->
    <footer id="colophon" class="site-footer" role="contentinfo">
        <?php get_sidebar( 'main' ); ?>

        <div class="site-info">
            <?php do_action( 'twentythirteen_credits' ); ?>
            <a href="<?php echo esc_url( __( 'http://wordpress.org/', 'twentythirteen' ) ); ?>" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'twentythirteen' ); ?>">. <?php printf( __( 'Proudly powered by %s', 'twentythirteen' ), 'WordPress' ); ?></a>
    .       </div><!-- .site-info -->
        </footer><!-- #colophon -->
    </div><!-- #page -->

    <?php wp_footer(); ?>
</body>
</html>

The problem is that the function wp_footer() appears to be including plugins and code that I don't want there. Specifically, the search widget.

I reviewed this article. Also the codex, directs me to the directory wp-includes/general-template.php, which does not tell me anything about which template tags it might be requiring (I was expecting it would require the search widget).

How does one customize the behavior of wp_footer? Where (in the file directory) should one look to see what html/php that wp_footer is dynamically producing?

share|improve this question
add comment

1 Answer 1

This could be multiple things. I'm not sure what the credits do. However, the chance is quite big that the search field is being created by a widget, shown in the get_sidebar('main'). Under "Appearance" > "Widgets", you should be able to find more information.

The template being called is probably sidebar-main.php.

If it is a specific plugin creating the output into the wp_footer() (which I think is unlikely), you could probably find it with add_action('wp_footer', 'the_function');, "the_function" being the function called.

This specific action hooks a function into the wp_footer().

wp_footer is mainly used to load javascripts and other necessities, but not so much to add extra content.

I hope this clears things up for you a bit. In case it didn't, I'd be glad to clarify as much as possible.

share|improve this answer
    
Correct. As it turns out, my point of focus should have been get_sidebar('main'), because the footer was actually rendering all the widgets I placed in my main sidebar. Thank you. –  Daniel Dropik Nov 7 '13 at 16:50
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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