• I’ve got a site I’m working on that I’d like to use the Menu system for (because it is just an amazing time saver). However, I’d really like to use the ol (ordered list) instead of an ul (unordered list).

    Has anyone figured out how to do this?

Viewing 1 replies (of 1 total)
  • I’ve not tried to use this particular argument array parameter, but wp_nav_menu() (Codex ref) includes items_wrap, which you could try to modify.

    It defaults to:

    'items_wrap'      => '<ul id=\"%1$s\" class=\"%2$s\">%3$s</ul>'

    Which you could change to:

    'items_wrap'      => '<ol id=\"%1$s\" class=\"%2$s\">%3$s</ol>'

    So, assuming you’re passing a Theme Location (among other possible array parameters), your call might look like this:

    wp_nav_menu( array(
        'theme_location'  => 'my_theme_location',
        'items_wrap'      => '<ol id=\"%1$s\" class=\"%2$s\">%3$s</ol>'
    ) );

Viewing 1 replies (of 1 total)
  • The topic ‘wp_nav_menu – use an Ordered List’ is closed to new replies.