how to get nav menu list through menu name in wordpress

How to get nav menu list through menu name in WordPressI'm using this code by this code but showing all pages not w

How to get nav menu list through menu name in WordPress

I'm using this code by this code but showing all pages not working with custom nav menu name

<?php wp_page_menu('sort_column=ID&amp;sort_order=desc;'); ?>

How to get nav menu list through menu name in WordPress

I'm using this code by this code but showing all pages not working with custom nav menu name

<?php wp_page_menu('sort_column=ID&amp;sort_order=desc;'); ?>
Share Improve this question edited Nov 28, 2012 at 6:27 shea 5,6624 gold badges39 silver badges62 bronze badges asked Nov 26, 2012 at 22:54 javeednizarjaveednizar 211 silver badge2 bronze badges 0
Add a comment  | 

1 Answer 1

Reset to default 2

I think you're looking for the wp_nav_menu() function, which deals with the navigation menus that you create in the WordPress admin (Appearance > Menus)

You can call it like this:

<?php wp_nav_menu( array( 'menu' => 'Header Menu' ) ); ?>

Where Header Menu is the name of the menu you want to print. There are other parameters available.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745528565a4631587.html

相关推荐

  • how to get nav menu list through menu name in wordpress

    How to get nav menu list through menu name in WordPressI'm using this code by this code but showing all pages not w

    3小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信