문제

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.

도움이 되었습니까?

해결책

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

WordPress menu item class

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 wordpress.stackexchange
scroll top