I’m currently running a website and would like to move to WordPress due to the fact that my website’s content keeps growing each and every day and it is becoming very hard to actually keep up with everything. So I have decided to build myself a custom WordPress theme. For a beginner I am actually doing pretty good. I am done with the whole theme. All that is left is the menu and it is killing me.
1) I want two menus. The first menu should just give me the unordered list. But for some reason WordPress gives all these classes and all that for no apparent reason. The only class I need is current-page-item.
2) The second menu is a bit more complicated. For this menu as like the menu above all I want is just to grab the unordered list it should have no id and neither should the unordered list have a div wrapping around it and if it should have a div I would prefer it to be html5 nav wrapping around the unordered list. Also I want to add custom css classes to all the list items. Like so for all li tags they should all have the tags cat-item and then they should have item-100 and for each
additional li tag that there is item-100 should switch to item-101 and so fourth. Also for the list item that contains a drop down I would like to place a span tag inside the a tag but after the text.
Can anyone please help me? Would be greatly appreciated.
The first menu should just give me the unordered list.
Which it does, using the
If classes are redundant, don’t worry about it, they’re there just-in-case you need them.
You can use the same
wp_nav_menu()function, but use a ‘custom menu’ built through Appearance > Menu
Call it through
For the wrapping HTML5 element, try using
'container' => 'nav'as one of the
- The topic ‘WordPress 3.0 Custom Menu’ is closed to new replies.