duanshang9426 2014-05-27 19:16
浏览 109
已采纳

WP页脚菜单不起作用?

I have been working on a site to change from HTML To Wordpress CMS...so got completed everything...Now stuck in one problem..and that is that I have declared the Main Navigation and Footer Navigation correctly (according to me) in functions.php file as :

/* Register Nav Main Menu */
register_nav_menus (array('main-nav' => 'Main Navigation'));
register_nav_menus (array('footer-nav' => 'Footer Navigation'));

while I am calling the both menus in correct way as for main-nav I am calling it in header.php as :

wp_nav_menu( array( 'menu' => 'main-nav' ));

while calling the footer-nav as following in footer.php as :

wp_nav_menu( array( 'menu' => 'footer-nav' ));

but in both places only main-nav is shown...so what did I do wrong please?..Need a hand to fix it...!

Waiting for your replies..!

Here is live link to the site as : http://www.huntedhunter.com/minaterra/

  • 写回答

1条回答 默认 最新

  • doufei3561 2014-05-27 19:34
    关注

    try changing:

    wp_nav_menu( array( 'menu' => 'footer-nav' ));
    

    to

    wp_nav_menu( array( 'theme_location' => 'footer-nav' ));
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
编辑
预览

报告相同问题?

手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部