我复制了Wordpress安装以移动到另一台服务器。除了一个文件外,所有文件都可以找到。我创建了一个标题商店。php文件调用我的商店页面上的某个菜单。在第一台服务器中,它正在工作。在新版本中,它没有。在我看来,它真的很疯狂。
以下是文件:
<!doctype html>
<?php get_header(); ?>
<section class="grid wrapper shoptopmenu" id="content">
<div class="shop-menu">
<?php
$defaults = array(
\'menu\' => \'shop-top-menu\',
\'container\' => \'nav\',
\'container_class\' => \'grid wrapper\',
\'container_id\' => \'shopmenue\',
\'menu_class\' => \'unit full grid\',
\'menu_id\' => \'\',
\'echo\' => true,
\'fallback_cb\' => \'wp_page_menu\',
\'before\' => \'\',
\'after\' => \'\',
\'link_before\' => \'\',
\'link_after\' => \'\',
\'items_wrap\' => \'<ul id="%1$s" class="%2$s">%3$s</ul>\',
\'depth\' => 0,
\'walker\' => \'\'
);
wp_nav_menu( $defaults );
?>
</div>
在第一台服务器中,HTML代码是:<section class="grid wrapper shoptopmenu" id="content">
<div class="shop-menu">
<nav id="shopmenue" class="grid wrapper">
<ul id="menu-shop-top-menu" class="unit full grid">
.....
</ul>
</nav>
在新服务器中,HTML代码为:<section class="grid wrapper shoptopmenu" id="content">
<div class="shop-menu">
<div class="unit full grid">
<ul>
....
</ul>
</div>
你可以看到nav
元素以及ul
缺少元素。其他一切都一样。在发疯之前有什么想法吗?:P