WP Body Open Hook

Function Name: wp_body_open()
Supported Version: WordPress 5.2+

The function should be placed inside of the tag immediately, see sample code below:

<body <?php body_class(); ?>>
<?php wp_body_open(); ?>

Note: this hook should be reserved for output of unseen elements like script tags or meta data.

Backwards Compatibility

<?php
if ( ! function_exists( 'wp_body_open' ) ) {
        function wp_body_open() {
                do_action( 'wp_body_open' );
        }
}

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.