These hooks fire on every page, in the document <head> and around the <body> element.
Hooks in firing order
Document
wp_head
GP Free
The wp_head hook is a standard hook in WordPress, and should only include things that go into the <head> section of your website.
Parameters: none. Default: —.
add_action( 'wp_head', function() {
?>
<div class="my-notice">Insert your content here.</div>
<?php
} );
Guide: Developers
wp_body_open
GP Free
The wp_body_open hook is placed immediately after the opening of the body tag.
Parameters: none. Default: —.
add_action( 'wp_body_open', function() {
?>
<div class="my-notice">Insert your content here.</div>
<?php
} );
Guide: Developers
wp_footer
GP Free
The wp_footer hook is a standard hook in WordPress that appears before the closing </body> element of your website.
Parameters: none. Default: —.
add_action( 'wp_footer', function() {
?>
<div class="my-notice">Insert your content here.</div>
<?php
} );
Guide: Developers