Support » Fixing WordPress » Code after wp_footer() not executing

  • While doing some W3C validation testing on a WordPress site I admin I noticed that all the HTML following <?php wp_footer(); ?> wasn’t getting executed.

    I know that at one point at least this was working, and also that not much has changed since that time.

    I’ve since tried disabling each plug-in installed individually, but still have had no luck finding the culprit.

    There are no error messages being displayed either. It seems like things are just kind of stopping there.

    Any advice on a debugging procedure, or possible fixes would be greatly appreciated!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi ibullock, can you use pastebin to show us the code that you’re referring to?

    There’s really not much to put into pastebin. The code as it stands is simply HTML ending tags for the body and html elements, but anything I put after the wp_footer call doesn’t execute.

    <?php wp_footer(); ?>

    Here’s a pastebin of what the page code looks like when I view page source:

    Things look pretty normal other than the closing tags not rendering.

    I just got an idea… Maybe something being called within the footer function is throwing an error and then stopping execution of the rest of the template.

    Try enabling errors by editing your wp-config file:

    define('WP_DEBUG', true);

    Hi ibullock, have you been able to make any progress with figuring out why that coding is not executing?

    Hi Brad,

    I’m just getting a start on debugging things this morning. Looks like a few plugins are having issues. “Headers already sent” seems to account for most of them. But some are also coming up with undefined indexes.

    Thanks for the tip about the DEBUG setting in wp-config, I don’t know why I didn’t think about that.

    I’ll post again once I’ve got things figured out.

    Looks like something got uncommented in the theme’s functions.php and was causing a bunch of errors down the line.

    Thanks for the help!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Code after wp_footer() not executing’ is closed to new replies.