I am facing the error in wordpress while using hello elementor theme Fatal error: Uncaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, function "display_initial_avatar" not found or invalid function name in /home/aichie5/aichief.com/wp-includes/class-wp-hook.php:326 Stack trace: #0 /home/aichie5/aichief.com/wp-includes/plugin.php(205): WP_Hook->apply_filters('<img alt='' src...', Array) #1 /home/aichie5/aichief.com/wp-includes/pluggable.php(3012): apply_filters('get_avatar', '<img alt='' src...', 38, 64, 'leira_letter_av...', '', Array) #2 /home/aichie5/aichief.com/wp-includes/admin-bar.php(329): get_avatar(38, 64) #3 /home/aichie5/aichief.com/wp-includes/class-wp-hook.php(324): wp_admin_bar_my_account_menu(Object(WP_Admin_Bar)) #4 /home/aichie5/aichief.com/wp-includes/class-wp-hook.php(349): WP_Hook->apply_filters('', Array) #5 /home/aichie5/aichief.com/wp-includes/plugin.php(565): WP_Hook->do_action(Array) #6 /home/aichie5/aichief.com/wp-includes/admin-bar.php(97): do_action_ref_array('admin_bar_menu', Array) #7 /home/aichie5/aichief.com/wp-includes/class-wp-hook.php(324): wp_admin_bar_render('') #8 /home/aichie5/aichief.com/wp-includes/class-wp-hook.php(349): WP_Hook->apply_filters('', Array) #9 /home/aichie5/aichief.com/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #10 /home/aichie5/aichief.com/wp-includes/general-template.php(3097): do_action('wp_body_open') #11 /home/aichie5/aichief.com/wp-content/themes/hello-elementor/header.php(28): wp_body_open() #12 /home/aichie5/aichief.com/wp-includes/template.php(810): require_once('/home/aichie5/a...') #13 /home/aichie5/aichief.com/wp-includes/template.php(745): load_template('/home/aichie5/a...', true, Array) #14 /home/aichie5/aichief.com/wp-includes/general-template.php(48): locate_template(Array, true, true, Array) #15 /home/aichie5/aichief.com/wp-content/themes/hello-elementor/index.php(15): get_header() #16 /home/aichie5/aichief.com/wp-includes/template-loader.php(106): include('/home/aichie5/a...') #17 /home/aichie5/aichief.com/wp-blog-header.php(19): require_once('/home/aichie5/a...') #18 /home/aichie5/aichief.com/index.php(18): require('/home/aichie5/a...') #19 {main} thrown in /home/aichie5/aichief.com/wp-includes/class-wp-hook.php on line 326 May be some updating have caused this issue to theme or elementor plugin, can anybody have the idea? I tried editing class-wp-hook on line 326 $value = call_user_func_array( $the_['function'], array_slice( $args, 0, $the_['accepted_args'] ) ); but the issue still persists.
Jese Leos
September 12, 2024
Verified user
It looks like the function display_initial_avatar is not found or is not a valid callback. display_initial_avatar function is likely being referenced in a hook or filter, but it doesn't exist or hasn't been defined. Also you can add fallback function to handle fatal error. function display_initial_avatar($avatar, $id_or_email, $size, $default, $alt) { // Here you can add your custom avatar logic. return $avatar; }