Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add span in wordpress menu

I want to add a <span> in wordpress menu just after <a> tag so that it should look like this

<li class="menu-item menu-item-type-post_type menu-item-object-page current-menu-item page_item page-item-4 current_page_item menu-item-13">
<a href="http://wordpress.org/"><span>Home</span></a>
</li>

Any help and suggestions will be appreciable.

like image 444
NewUser Avatar asked Nov 10 '11 17:11

NewUser


1 Answers

Hey thanks for your reply but I got it. It should be like this

<?php wp_nav_menu( array( 'theme_location' => 'primary', 'link_before' => '<span>','link_after'=>'</span>' ) ); ?> 
like image 139
NewUser Avatar answered Oct 16 '22 00:10

NewUser