Is there a way to wrap UL sub-menu to div?

Here is my problem is there a way to wrap WordPress UL submenu to div?

WordPress output is this:

Read More
<ul>
  <li>link 1</li>
  <li>link 2</li>
  <li>link 3
    <ul class="sub-menu">
      <li>Sub-link 1</li>
      <li>Sub-link 2</li>
      <li>Sub-link 3</li>
    </ul>
  </li>
</ul>

And I need to get this:

<ul>
  <li>link 1</li>
  <li>link 2</li>
  <li>link 3
    <div class="wrap">
      <ul class="sub-menu">
        <li>Sub-link 1</li>
        <li>Sub-link 2</li>
        <li>Sub-link 3</li>
      </ul>
    </div>
  </li>
</ul>

Related posts

Leave a Reply

1 comment