以下是我的菜单html:
<div id="main-menu-container">
<ul id="main-menu">
<li><a href="#"><span aria-hidden="true" class="icon-home"></span>Home</a></li>
<li><a href="#"><span aria-hidden="true" class="icon-briefcase"></span>Portfolio</a></li>
<li><a href="#"><span aria-hidden="true" class="icon-cog"></span>Services</a></li>
<li><a href="#"><span aria-hidden="true" class="icon-download"></span>Freebies</a></li>
<li><a href="#"><span aria-hidden="true" class="icon-user"></span>About</a></li>
</ul>
</div>
&;wp代码:
<?php
wp_nav_menu(
array(
\'theme_location\' => \'primary\',
\'container_id\' => \'main-menu-container\',
\'menu_id\' => \'main-menu\',
)
);
?>
如您所见,问题是我在每个列表项中添加了不同的span类&;我不能使用
link_before
&;
link_after
. 我不知道如何添加它们
wp_nav_menu
.
我如何解决这个问题?