Home › Forums › WoodMart support forum › Widgets area got error after adding Woodmart theme › Reply To: Widgets area got error after adding Woodmart theme
August 30, 2022 at 11:38 am
#400381
Luke Nielsen
Keymaster
Hello,
Thank you for reaching out to us!
1. This is a WordPress bug, so we would recommend installing the free Classic widgets plugin to solve it. We hope they would fix it soon as possible.
https://wordpress.org/plugins/classic-widgets/
2. Please enter the below code to the functions.php
file in the child theme, the updated file should start to work after it.
if ( ! function_exists( 'woodmart_get_element_template' ) ) {
/**
* Loads a template part into a template.
*
* @since 6.1.0
*
* @param string $element_name Template name.
* @param array $args Arguments.
* @param string $template_name Module name.
*/
function woodmart_get_element_template( $element_name, $args, $template_name ) {
if ( ! empty( $args ) && is_array( $args ) ) {
extract( $args ); // phpcs:ignore
}
include get_theme_file_path( '/inc/template-tags/elements/' . $element_name . '/' . $template_name );
}
}
Please feel welcome to reach out to me with any questions you may have and I would be more than happy to help.
Kind Regards