WordPress action hook · part of WordPress core

wp_footer

A WordPress core action that 22 plugins also fire themselves, running on 4.7M+ sites between them.

How to use wp_footer

It's an action: your callback runs at that point. Nothing needs to be returned. Add this to your theme's functions.php or a small custom plugin:

functions.php
add_action( 'wp_footer', function() {
	// Your code runs here.
}, 10, 1 );

Argument names come from UpdraftPlus: WP Backup & Migration Plugin's source. Other plugins may pass different values: check the call in the plugin you're targeting below.

This hook is fired by WordPress core too. Official reference on developer.wordpress.org →

22 plugins that fire wp_footer

Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.

  1. UpdraftPlus: WP Backup & Migration Plugin icon UpdraftPlus: WP Backup & Migration Plugin4+ million installs do_action( 'wp_footer' ) central/modules/analytics.php:125
  2. Website Builder by SeedProd icon Website Builder by SeedProd600,000+ installs do_action( 'wp_footer' ) app/routes.php:49
  3. Beaver Builder Page Builder icon Beaver Builder Page Builder100,000+ installs do_action( 'wp_footer' ) includes/ui-iframe.php:57
  4. Better Messages icon Better Messages10,000+ installs do_action( 'wp_footer' ) inc/design.php:936
  5. WPAdverts icon WPAdverts4,000+ installs do_action( 'wp_footer' ) addons/payments/templates/white-page.php:21
  6. Creta Testimonial Showcase icon Creta Testimonial Showcase3,000+ installs do_action( 'wp_footer' ) admin/class-meta-shortcode.php:325
  7. Custom Login Page Templates icon Custom Login Page Templates2,000+ installs do_action( 'wp_footer' ) includes/customizer.php:278
  8. Source Lens icon Source Lens300+ installs do_action( 'wp_footer' ) includes/class-slcf-header-footer-scanner.php:88
  9. Email Customizer icon Email Customizer300+ installs do_action( 'wp_footer' ) includes/template/footer.php:16
  10. Mobile App Canvas icon Mobile App Canvas200+ installs do_action( 'wp_footer' ) templates/notifications/list.php:203
  11. Treweler Map Builder icon Treweler Map Builder80+ installs do_action( 'wp_footer' ) includes/twer-template-functions.php:67
  12. iWPhone icon iWPhone70+ installs do_action( 'wp_footer' ) iwphone-by-contentrobot/footer.php:6
  13. HTTPS Mixed Content Detector icon HTTPS Mixed Content Detector60+ installs do_action( 'wp_footer' ) violation-locations/enqueue-base.php:70
  14. Ask My Content icon Ask My Content20+ installs do_action( 'wp_footer' ) includes/content.php:918
  15. TableCrafter icon TableCrafter10+ installs do_action( 'wp_footer' ) includes/class-tc-ajax.php:7619
  16. Postr For Nostr icon Postr For Nostr10+ installs do_action( 'wp_footer' ) classes/Plugin.php:197
  17. MotaWord Translation icon MotaWord Translation10+ installs do_action( 'wp_footer', 'wp_admin_bar_render', 1000 ) includes/class-motaword-active-serve.php:300
  18. AssetPilot icon AssetPilotFewer than 10 installs do_action( 'wp_footer' ) includes/Assets/AssetCapture.php:114
  19. Shoot My File icon Shoot My FileFewer than 10 installs do_action( 'wp_footer' ) includes/request.php:63
  20. BconGlobal icon BconGlobalFewer than 10 installs do_action( 'wp_footer' ) php/Bcon.php:697
  21. Alpha Fields icon Alpha FieldsFewer than 10 installs do_action( 'wp_footer' ) includes/extensions/form-styler/preview.php:182
  22. Smart Woo Service Invoicing icon Smart Woo Service InvoicingFewer than 10 installs do_action( 'wp_footer' ) includes/frontend/class-smartwoo-client-portal.php:115

Need a customisation built on this hook?

Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.