0

我正在使用 wordpress 和 wp_nav_menu 函数来获取导航,我想在 ul 中添加一个跨度,如下所示:

<ul>
  <li><a href="">url1</a></li>
  <li><a href="">url2</a></li>
  <li><a href="">url3</a></li>
  <span></span> <-- I want to add this
</ul>

我用谷歌搜索了几次,但找不到我必须在 wp_nav_menu 中更改的选项

<?php wp_nav_menu( array( 
    'theme_location'  => 'primary',
    'menu'            => '',
    'container'       => 'div',
    'container_class' => '',
    'container_id'    => '',
    'menu_class'      => 'menu',
    'menu_id'         => '',
    'echo'            => true,
    'fallback_cb'     => 'wp_page_menu',
    'before'          => '',
    'after'           => '',
    'link_before'     => '',
    'link_after'      => '',
    'items_wrap'      => '<ul id="%1$s" class="%2$s">%3$s</ul>',
    'depth'           => 0,
    'walker'          => ''
    ) ); ?>
4

1 回答 1

1

http://codex.wordpress.org/Function_Reference/wp_nav_menu

看看$items_wrap的例子

于 2013-02-25T20:45:53.733 回答