9

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.

1

1 Answer 1

7

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

WordPress menu item class

2
  • 1
    Thanks for the screen, I was looking for the "class" field but couldn't find it! Commented Oct 17, 2012 at 17:54
  • 3
    And another big thanks! to the WordPress crew for "helping" developers out by hiding important functionality in obscure places.
    – phenry
    Commented Jan 22, 2014 at 23:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.