• I found that wp_footer(), if placed right before </body> tag as it should, seriously halts execution of javascript on my site.
    jQuery parts of site like featured content rotation or tabbed content / box.
    When I remove it, everything works fine except wp-polls plugin, it obviously loads javascript in wp_footer()…

    Now I’ve plaeced wp_footer() inside the <head> tag and everyting works fine. For now. Are there any possible problems with that? Since codex recommends placing it right before </body> tag.

    Also, what does this function do? Where can I find exact piece of code that it calls?

Viewing 5 replies - 1 through 5 (of 5 total)
  • My guess is that you’ve got a javascript error in whatever is loaded by wp_footer(). Do you have an url?

    Thread Starter kreso777

    (@kreso777)

    Hm, it works fine if it is placed in heaader, right after wp_header(), and just halts loading a bit when placed in footer.
    URL is http://www.serijala.com
    wp_footer() is currently in header and it works fine now… But I’m just concerned if it’s a smart thing to do, putting wp_footer in header.

    How can i find what is loaded by wp_footer()?

    Putting a call for the footer in the header seems illogical to me. When will the page load?

    You have many errors, http://validator.w3.org/check?verbose=1&uri=http%3a%2f%2fwww.serijala.com%2f

    How can i find what is loaded by wp_footer()?
    page.php calls footer.php with <?php get_footer(); ?>

    Thread Starter kreso777

    (@kreso777)

    As I’ve said – it loads faster when it is in header than in footer.
    jQuery featured content rotation and tabbed box are loading very long if wp_footer is in footer as it should be.
    When I place it in header (like now)

    Regarding validator, code is more-less valid when I comment out video box on the bottom (4 errors remain though). They are mostly related to using “&” in links…

    page.php calls footer.php with <?php get_footer(); ?>
    No, I mean the content / code that it writes out. It must be some <script> lines to include javascript, since when I remove wp_footer from my template, wp-polls plugin doesn’t work (because javascript doesn’t load).

    There’s something in the wp_footer that prevents other javascript files from fully loading immediatley.

    Like I said, sounds like you have a javascript error. That could be related to your loading 4 different jquery files and two different jquery.ui’s. At any rate, everytime I load the page I get an error in ga.js and lightbox_call.js.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘wp_footer() placement’ is closed to new replies.