wordpress wp_nav_menu在ul的末尾添加span

时间:2013-02-25 20:12:05

标签: php html wordpress navigation

我使用wordpress和wp_nav_menu函数来获取导航,我想在ul里面添加一个span,如下所示:

<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'          => ''
    ) ); ?>

1 个答案:

答案 0 :(得分:1)