php - Can I add a class to the <li>'s output by WordPress' wp_nav_menu() function? -


i'm using grid layout, , links in menu need class grid_1, wordpress automatically generates classes page_item page-item-#. how can add class li? i'm aware alternately add entry under .page_item stylesheet, feel that's more messy should be.

thanks in advance!

there's not way can add custom class ul , use target li's.

$args = array( 'menu_class' => 'myclass' );  wp_nav_menu($args); 

Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

php - Change action and image src url's with jQuery -