WordPress action hook · part of WordPress core
wp_body_open
A WordPress core action that 51 plugins also fire themselves, running on 4.2M+ sites between them.
“WP Defaults”
How to use wp_body_open
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:
add_action( 'wp_body_open', function() {
// Your code runs here.
}, 10, 1 );Argument names come from Ultimate Addons for Elementor'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 →
51 plugins that fire wp_body_open
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
Ultimate Addons for Elementor2+ million installs
do_action( 'wp_body_open' )themes/default/hfe-header.php:20 -
Royal Addons for Elementor600,000+ installs
do_action( 'wp_body_open' )admin/templates/views/royal/theme-header-royal.php:31 -
Kirki400,000+ installs
do_action( 'wp_body_open' )includes/Frontend/views/template/page.php:60 -
Templately300,000+ installs
do_action( 'wp_body_open' )views/templates/header.php:21 -
Jeg Kit for Elementor300,000+ installs
do_action( 'wp_body_open' )templates/single-template.php:12 -
CartFlows200,000+ installs
do_action( 'wp_body_open' )classes/class-cartflows-functions.php:525 -
PowerPack Addons for Elementor: Widgets, Form Styler and Templates70,000+ installs
do_action( 'wp_body_open' )classes/theme-support/includes/ppe-header.php:19 -
Brizy60,000+ installs
do_action( 'wp_body_open' )public/views/templates/brizy-blank-template.php:27 -
Post and Page Builder by BoldGrid50,000+ installs
do_action( 'wp_body_open' )includes/template/page/content-only.php:12 -
Themesflat Addons For Elementor40,000+ installs
do_action( 'wp_body_open' )tf-header.php:12 -
Sina Extension for Elementor40,000+ installs
do_action( 'wp_body_open' )inc/templates/header.php:25 -
Master Addons for Elementor30,000+ installs
do_action( 'wp_body_open' )inc/admin/theme-builder/templates/views/ma-canvas.php:32 -
Gutentor30,000+ installs
do_action( 'wp_body_open' )page-templates/template-gutentor-canvas.php:22 -
Xpro Theme Builder For Elementor20,000+ installs
do_action( 'wp_body_open' )inc/templates/blank.php:15 -
Fluid Checkout for WooCommerce20,000+ installs
do_action( 'wp_body_open' )templates/compat/themes/enfold/checkout-page-template/checkout/page-checkout-header.php:231 -
Animation Addons for Elementor10,000+ installs
do_action( 'wp_body_open' )templates/header.php:22 -
Nexter Extension10,000+ installs
do_action( 'wp_body_open' )include/classes/load-pages/template/nxt-header.php:22 -
King Addons for Elementor10,000+ installs
do_action( 'wp_body_open' )includes/extensions/Header_Footer_Builder/themes/default/ELHF_Default_Header.php:15 -
MotoPress Hotel Booking Styles & Templates10,000+ installs
do_action( 'wp_body_open' )includes/template-editor/includes/templates/single/canvas.php:27 -
EleSpare10,000+ installs
do_action( 'wp_body_open' )header-footer/templates/compat/elespare.php:5 -
aThemes Addons for Elementor7,000+ installs
do_action( 'wp_body_open' )inc/theme-builder/templates/header.php:17 -
Magazine Blocks6,000+ installs
do_action( 'wp_body_open' )includes/Templates/template-render.php:12 -
WPFunnels5,000+ installs
do_action( 'wp_body_open' )includes/core/page-templates/class-manager.php:288 -
easy.jobs4,000+ installs
do_action( 'wp_body_open' )includes/class-easyjobs-helper.php:1823 -
News Kit Addons For Elementor3,000+ installs
do_action( 'wp_body_open' )admin/templates/parts/builder-header-render.php:22 -
Job Manager & Career1,000+ installs
do_action( 'wp_body_open' )templates/single-thjm_jobs.php:67 -
WP Helper Premium1,000+ installs
do_action( 'wp_body_open' )views/frontend/pages/thankyou-template.php:162 -
Animation Pack900+ installs
do_action( 'wp_body_open' )modules/theme-builder/templates/header.php:24 -
X Addons for Elementor800+ installs
do_action( 'wp_body_open' )core-class/header-footer/xaddons-header.php:20 -
ST Elementor Addons500+ installs
do_action( 'wp_body_open' )theme-builder/inc/templates/blank.php:15 -
StoreBuild400+ installs
do_action( 'wp_body_open' )templates/theme-replacement.php:27 -
Add Custom Header Images400+ installs
do_action( 'wp_body_open' )add-custom-header-images.php:228 -
CRT Addons Builder and Widgets for Elementor300+ installs
do_action( 'wp_body_open' )includes/customizer/addons/templates/views/theme-header.php:29 -
Source Lens300+ installs
do_action( 'wp_body_open' )includes/class-slcf-runtime-scanner.php:368 -
Vertex Addons for Elementor200+ installs
do_action( 'wp_body_open' )html/admin/menus/builder/editor/header/tpl.php:24 -
Softtemplates For Elementor200+ installs
do_action( 'wp_body_open' )overrides/header-override.php:23 -
AboveWP Page Loader100+ installs
do_action( 'wp_body_open' )abovewp-page-loader.php:311 -
Fast Yandex Metrika100+ installs
do_action( 'wp_body_open' )fast-yandex-metrika.php:235 -
Pie Forms80+ installs
do_action( 'wp_body_open' )includes/form/preview-template.php:29 -
Simple Alert System40+ installs
do_action( 'wp_body_open' )classes.php:11 -
Elite Elementor Addons and Widgets20+ installs
do_action( 'wp_body_open' )admin/templates/views/elite/theme-header-elite.php:31 -
Max Elements for Elementor10+ installs
do_action( 'wp_body_open' )inc/theme-builder/inc/templates/blank.php:15 -
Magic Elements10+ installs
do_action( 'wp_body_open' )includes/MBuilder/templates/header.php:18 -
Live Chat for WordPress10+ installs
do_action( 'wp_body_open' )includes/compatibility.php:13 -
CC-Scripts10+ installs
do_action_deprecated( 'wp_body_open', array(), '2.0.0', 'wp_body' )includes/functions.php:13 -
MotaWord Translation10+ installs
do_action( 'wp_body_open', 'wp_admin_bar_render', 0 )includes/class-motaword-active-serve.php:299 -
Glidy Addons for Elementor10+ installs
do_action( 'wp_body_open' )templates/header.php:22 -
LC Addons Kit for ElementorFewer than 10 installs
do_action( 'wp_body_open' )includes/lcake-header-footer-builder.php:484 -
Glossy Mega MenuFewer than 10 installs
do_action( 'wp_body_open' )includes/glossymm-hf/themes/default/glossymm-header.php:26 -
Pixels Core Creative Tools for ElementorFewer than 10 installs
do_action( 'wp_body_open' )includes/theme-builder/themes/default/pixeccte-header.php:26 -
Huge Addons for ElementorFewer than 10 installs
do_action( 'wp_body_open' )includes/Classes/HeaderFooter/Renderer.php:337
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.