我得到了这个错误
致命错误:未捕获错误:在/home/stageidg/public\\u html/idg/wp-content/themes/idg-child/secondmenu中调用未定义的函数wp\\u nav\\u menu()。php:2堆栈跟踪:#0{main}抛出/home/stageidg/public\\u html/idg/wp-content/themes/idg-child/secondmenu。php在线2
php文件中的第2行是:
wp_nav_menu( array(\'menu\' => \'Services\', \'theme_location\'=>\'services\' ) );
由以下jquery代码调用:$.ajax(
{
url: "http://example.com/idg/wp-content/themes/idg-child/secondmenu.php", // path to your PHP file
dataType:"html",
success: function(data)
{
$(data).appendTo(inner_overlay); // load-into-div is the ID of the DIV where you load the <select>
} // success
}); // ajax
有什么想法吗?我做错了什么?