Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Add wp_body_open() to your theme

Added for backwards compatibility to support WordPress versions prior to 5.2.0.

if ( ! function_exists( 'wp_body_open' ) ) {
    /**
     * Fire the wp_body_open action.
     *
     * Added for backwards compatibility to support WordPress versions prior to 5.2.0.
     */
    function wp_body_open() {
        /**
         * Triggered after the opening <body> tag.
         */
        do_action( 'wp_body_open' );
    }
}