How to Fix Error: First argument is expected to be a valid callback, ‘suffusion_mega_menu_walker’

How to Fix Error: First argument is expected to be a valid callback, ‘suffusion_mega_menu_walker’ 410 307 Jesandy

Suffusion is one of the best theme i ever used but when download some plugin on, get this error on the site back end.

Warning: call_user_func_array() [
function.call-user-func-array
]: First argument is expected to be a valid callback, ‘suffusion_mega_menu_walker’ was given in /home/sitename/public_html/sitesubname/wp-includes/plugin.php on line 170

fix error First argument is expected to be a valid callback, 'suffusion_mega_menu_walker'

Sites front end still working well, but the warning just keep appears on the backend

How to fix:

>> go to your FTP >>  go to your Suffusion theme folder >> open: functions.php line 213 >> and locate this function

if (current_theme_supports('mega-menus')) {
add_filter('walker_nav_menu_start_el', 'suffusion_mega_menu_walker', 10, 4);
}

Replace with

if (current_theme_supports('mega-menus') && !is_admin()) {
add_filter('walker_nav_menu_start_el', 'suffusion_mega_menu_walker', 10, 4);
}

hope it will fix yours

Jesandy

"Jesus Believer, Founder of BEBRIGHT, CEO of SEOLangit.com, Digital Marketers, Brand Marketing Consultant, Game Reviewer, @zadewagaming contributors, Traveler, Movie Freaks, Pizza Lovers, SEO Specialist, Webmaster and Drupal Enthusiast"

All stories by: Jesandy

Leave a Reply

Your email address will not be published.