Hi,
the hook doesn’t work on WordPress 5.2.3 with Enfold 4.2.6.
I’m also unable to upgrade to Enfold 4.6.2 since it states that the theme is already the last version.
This is the code I expect working as wp_head
does:
function add_code_after_body(){
?>
I should find this line after body tag
<?php
}
add_action('wp_body_open', 'add_code_after_body');
Solved
Step 1
Installed manually a new version of the theme:
– download from theme forest
– uncompress and rename locally the folder from enfold
to enfold_new
– uploaded the folder via FTP to /wp/wp-content/themes
– renamed /wp/wp-content/themes/enfold
to /wp/wp-content/themes/enfold-old
– renamed /wp/wp-content/themes/enfold-new
to /wp/wp-content/themes/enfold
Now reload the page of the site and the fresh files are loaded.
Step 2
Now there is an issue with the API key, since now it uses tokens.
So, to obtain a token, visit https://build.envato.com/create-token/
Select the following the permissions as explained here https://kriesi.at/documentation/enfold/theme-registration/#toggle-id-5
Step 3
Now the hook wp_body_open is available, since the new header.php
file has these lines
if( function_exists( 'wp_body_open' ) )
{
wp_body_open();
}
else
{
do_action( 'wp_body_open' );
}
______
Hope this could help others.