【问题标题】:Warning: Undefined array key 5081 in Worpress警告:Wordpress 中未定义的数组键 5081
【发布时间】:2022-11-07 19:44:30
【问题描述】:

警告:第 210 行 /customers/c/c/a/bhcjobs.com/httpd.www/wp-includes/nav-menu-template.php 中未定义的数组键 5081

    // Set up the $menu_item variables.
    _wp_menu_item_classes_by_context( $menu_items );

    $sorted_menu_items        = array();
    $menu_items_tree          = array();
    $menu_items_with_children = array();
    foreach ( (array) $menu_items as $menu_item ) {
        $sorted_menu_items[ $menu_item->menu_order ] = $menu_item;
        $menu_items_tree[ $menu_item->ID ]           = $menu_item->menu_item_parent;
        if ( $menu_item->menu_item_parent ) {
            $menu_items_with_children[ $menu_item->menu_item_parent ] = 1;
        }

        // Calculate the depth of each menu item with children
        foreach ( $menu_items_with_children as $menu_item_key => &$menu_item_depth ) {
            $menu_item_parent = $menu_items_tree[ $menu_item_key ];
            while ( $menu_item_parent ) {
                $menu_item_depth  = $menu_item_depth + 1;
                $menu_item_parent = $menu_items_tree[ $menu_item_parent ];
            }
        }
    }

请帮助解决这个问题

我需要帮助来解决这个问题

【问题讨论】:

    标签: php wordpress navigation custom-wordpress-pages


    【解决方案1】:

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-07-01
      • 2022-10-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-12-20
      • 2022-09-23
      • 1970-01-01
      相关资源
      最近更新 更多