wordpress - I want to add an span after nav container in WP menu -


here code,

$args = array(          'container'         => 'nav',         'container_id'      => 'menu',          'menu_class'        => 'menu clearfix',          'fallback_cb'       => 'mfn_wp_page_menu',          'depth'             => 5,         'link_before'       => '<span>',         'link_after'        => '</span>',     ); 

here output html ,

<nav id="menu34" class="menu-main-menu-container"> <ul id="menu-main-menu" class="menu clearfix">   <li><a href=""><span>home</span></a></li> </ul> </nav> 

i need span after <nav> .

please out.

try this

$args = array(      'container'         => 'div',     'container_id'      => 'menu',      'menu_class'        => 'menu clearfix',      'fallback_cb'       => 'mfn_wp_page_menu',      'depth'             => 5,     'link_before'       => '<span>',     'link_after'        => '</span>', );    <nav id="menu34" class="menu-main-menu-container">     <div>//your div         <?php                    $args = array(                                   'container'      => false,                               );             wp_nav_menu($args);         ?>     </div> </nav> 

or

$args = array(      'container'         => 'div',     'container_id'      => 'menu',      'container_class'   => 'you div class',     'menu_class'        => 'menu clearfix',      'fallback_cb'       => 'mfn_wp_page_menu',      'depth'             => 5,     'link_before'       => '<span>',     'link_after'        => '</span>', );   <nav id="menu34" class="menu-main-menu-container">          <?php                    $args = array(                                   'container'      => true,                               );             wp_nav_menu($args);         ?>  </nav> 

Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -