0

I use this script to show the wordpress menu

<?php  
   $argsM = array(
      'theme_location'  => 'menu-principal',
      'items_wrap'      => '<ul class="sf-menu nav navbar-nav %2$s">%3$s</ul>',
   );
   wp_nav_menu( $argsM );
?>

And it gives me a regular menu as

ul
  li - home
  li - shop
  li - contact us
ul

I try to find a way where I can put a div after each li for something similar to this

ul
  li - home
   div
  li - shop
   div
  li - contact us
   div
ul

I want to go this way if it's possible and not with a jQuery solution .append() or something else like that.

Sylver
  • 3
  • 3
  • does this help? https://stackoverflow.com/questions/11935423/how-do-i-generate-a-custom-menu-sub-menu-system-using-wp-get-nav-menu-items-in-w – Kinglish Nov 25 '21 at 23:39
  • By "after" you actually mean "in", yes? (Because "after" would not be valid HTML to begin with, div can not be a child of ul.) – CBroe Nov 26 '21 at 08:05

0 Answers0