Tell me more ×
WordPress Answers is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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
Simply use the "Class"-field for styling. Give it a unique class, target it in your CSS file. Done. – kaiser Oct 12 '12 at 15:48
@kaiser as an answer! – Rarst Oct 13 '12 at 21:47
@Rarst Okokok :) – kaiser Oct 14 '12 at 13:06

2 Answers

up vote 1 down vote accepted

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

enter image description here

share|improve this answer
1  
Thanks for the screen, I was looking for the "class" field but couldn't find it! – stillanonymous123 Oct 17 '12 at 17:54

Look into using a custom nav walker http://codex.wordpress.org/Function_Reference/wp_nav_menu#Using_a_Custom_Walker_Function

share|improve this answer
1  
Lone link is considered a poor answer since it is meaningless by itself and target resource is not guaranteed to be alive in the future. Please try to include at least summary of information you are linking to. – Rarst Oct 13 '12 at 21:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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