我正在使用子主题进行自定义,现在我想替换top menu 使用自定义小部件或file that contains custom content, 但是主题不支持挂钩、过滤器和操作,所以如何在不修改核心的情况下替换它header.php
?
下面是当前如何调用顶部菜单:
<?php $main_top = array(\'theme_location\' => \'Top_Menu\', \'container\' => \'\', \'menu_class\' => \'sf-top-menu\', \'menu_id\' => \'menu-top\', \'fallback_cb\' => false);?>
<?php if(!of_get_option(\'disable_top_menu\')==1){?>
<div class="mainmenu">
<?php wp_nav_menu($main_top);?>
<div class="clearfix"></div>
</div>
<?php }?>