自定义导航栏深度级别始终评估为零

我是wordpress的新手, 正在创建自定义导航栏, 并且我通过了3级深度, 但始终返回0, 请帮助我找出错误

下面是我的代码和输出

wp_nav_menu(array(
    'theme_location'    => 'primary', 'walker'            => new Walker_Nav_Menu_Page(), 'container'         => 'ul', 'menu_class'        => 'top-level', 'depth'             => 4
));
function start_el(&$output, $item, $depth = 0, $args = array(), $id = 0)
{
   var_dump($depth);
}
int(0)
int(0)
int(0)
int(0)
int(0)
int(0)
int(0)
int(0)
int(0)
int(0)
int(0)
int(0)

任何解决方案表示赞赏!


#1


默认情况下, 深度应为零, 这表示所有深度, 请删除深度

来源:

https://www.srcmini02.com/62397.html

微信公众号
手机浏览(小程序)

Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(): Failed to enable crypto in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_37813.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
0
分享到:
没有账号? 忘记密码?