navigation - Custom ID for certain menu item?

I'm displaying Wordpress menu using this function:wp_nav_menu( $args );Menu is set in wp-adminnav-menus.php.Can I

I'm displaying Wordpress menu using this function:

wp_nav_menu( $args );

Menu is set in wp-admin/nav-menus.php.

Can I somehow attach ID of my choice to one of the items? I want the menu to look like:

[ Link 1 ] [ Link 2] [ LOGO (that is Link 3 also ] [ Link 4 ] [ Link 5]

I know I could style ID of the logo link such as "menu-item-123", but I'd love to change it to "logo" or something that has a meaning :)

Thanks.

I'm displaying Wordpress menu using this function:

wp_nav_menu( $args );

Menu is set in wp-admin/nav-menus.php.

Can I somehow attach ID of my choice to one of the items? I want the menu to look like:

[ Link 1 ] [ Link 2] [ LOGO (that is Link 3 also ] [ Link 4 ] [ Link 5]

I know I could style ID of the logo link such as "menu-item-123", but I'd love to change it to "logo" or something that has a meaning :)

Thanks.

Share Improve this question asked Oct 12, 2012 at 15:24 stillanonymous123stillanonymous123 1331 gold badge1 silver badge4 bronze badges 1
  • Look into using a custom nav walker codex.wordpress/Function_Reference/… – paulruescher Commented Oct 12, 2012 at 15:27
Add a comment  | 

1 Answer 1

Reset to default 7

Simply use the "Class"-field for styling. Give it a unique class, target it in your CSS file. Done.

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

相关推荐

  • navigation - Custom ID for certain menu item?

    I'm displaying Wordpress menu using this function:wp_nav_menu( $args );Menu is set in wp-adminnav-menus.php.Can I

    1天前
    30

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

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

关注微信