Error “Trying to get property of non-object” with Custom Walker for wp_nav_menu
I get this error when there are no menus defined or no menus set for the location at Appearance->Menus. When that occurs wp_nav_menu uses a page walker fallback. The fallback (default) for wp_nav_menu is wp_walker_page which uses wp_page_menu which uses wp_list_pages which uses walk_page_tree which uses Walker_Page not Walker_Nav_Menu. And apparently the two walkers are … Read more