• Many themes out there still do not contain this simple (and required) line: <?php wp_footer(); ?>

    From a plugin developing standpoint I’m looking to code in a workaround for this. So two questions:

    What would be a decent way to detect the lack of wp_footer?

    Would there be a way to still output code before the </body> tag?

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    a) Don’t bump around here. We hate that.

    b) Only way to detect such a thing is to open the theme’s footer.php file as a text file, read it in, and search for the text in it.

    c) You probably don’t want to detect this. Too much overhead. Instead, just tell your users to add the line to their theme if it’s not there.

    d) All themes here on WordPress.org should have that. Recommend them.

    Thread Starter micropat

    (@micropat)

    Recommending properly-coded Themes and offering instructions on how to add that footer tag is what we’re doing, but this is still a very persistent problem unfortunately. Linking to the WP.org Theme Directory is a good idea.

    You’re right on the overhead, which is why we’re hoping for some decent (and clever) way to detect this. At this point it doesn’t seem that there is a good workaround to these poorly coded themes.

    I think to help combat such themes, it’d be awesome if the Theme preview would additionally scan and warn of a theme that doesn’t have the required tags, etc. — before activation.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Themes without wp_footer — workaround?’ is closed to new replies.