-
Notifications
You must be signed in to change notification settings - Fork 230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2.7.0: hello_elementor_body_open) no longer working #278
Comments
Same. My solution was to download the 2.6 version (https://github.com/elementor/hello-theme/releases/tag/v2.6.0) and upload it to the wp-admin and then turn off automatic updates for this theme. |
We removed You no longer need to use this function. You can use the native WordPress I'm trying to understand where/how do you use |
For me, it was an issue with the hello-child-theme using a child version of the header.php from https://github.com/elementor/hello-theme/blob/v2.6.0/header.php that included the hello_elementor_body_open function call. Because that function no longer exists, it caused sites to have issues - would have been better to have a deprecation notice or something instead of removing a function that has been in the theme for 4+ years. |
Hi @PaulHHM You are correct, we had to communicate the change better. From what I understand, sites using child themes, with custom <?php
/**
* The template for displaying the header
*
* This is the template that displays all of the <head> section, opens the <body> tag and adds the site's header.
*
* @package HelloElementor
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
?>
<!doctype html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<?php $viewport_content = apply_filters( 'hello_elementor_viewport_content', 'width=device-width, initial-scale=1' ); ?>
<meta name="viewport" content="<?php echo esc_attr( $viewport_content ); ?>">
<link rel="profile" href="https://gmpg.org/xfn/11">
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<?php hello_elementor_body_open(); ?>
<a class="skip-link screen-reader-text" href="#content">
<?php esc_html_e( 'Skip to content', 'hello-elementor' ); ?></a>
<?php
if ( ! function_exists( 'elementor_theme_do_location' ) || ! elementor_theme_do_location( 'header' ) ) {
if ( did_action( 'elementor/loaded' ) && hello_header_footer_experiment_active() ) {
get_template_part( 'template-parts/dynamic-header' );
} else {
get_template_part( 'template-parts/header' );
}
} The fix is simple, all you need to do is replace UPDATE: We plan to release a patch version (2.7.1) that fixes this issue. This patch won't require you to update your child theme. |
Awesome, thanks for your quick help! |
Hi there, just got a 'Fatal error: Uncaught Error: Call to undefined function hello_elementor_body_open)' due to the most recent update. What should I do?
The text was updated successfully, but these errors were encountered: