K
K
Konstantin2020-05-08 20:23:17
Layout
Konstantin, 2020-05-08 20:23:17

How to layout and display a menu in wordpress so that the parent element is the title?

Greetings, I can pull the menu on wordpress with ordinary lists between tags

  • , example:
<?php wp_nav_menu( array(
            'theme_location'  => 'foot_menu1',
              'menu'            => '3', 
              'menu_class'      => 'list-unstyled', 
              'echo'            => true,
              'fallback_cb'     => 'wp_page_menu',
              'items_wrap'      => '<ul id="%1$s" class="%2$s">%3$s</ul>',
            )
            ); ?>


But I can’t figure out how to make a menu so that it has a title (parent to title), which can be changed in the menu:
5eb5947d3e882467224502.jpeg
5eb59473ac30e556980572.jpeg

My menu (piece) also repeats the title twice:

<ul>
<li class="icon icon-arrow-left"> <a class="icon icon-phone" href="#">Автоэлектроника</a>
  <div class="mp-level">
    <h2>Автоэлектроника</h2>
    <ul>
      <li><a href="#">Gps навигаторы</a></li>
      <li><a href="#">Аудиосистемы</a></li>
      <li><a href="#">Прочее</a></li>
    </ul>
  </div>
</li>
</ul>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dima Polos, 2020-05-08
@dimovich85

https://www.youtube.com/watch?v=TaXBKfgFYoc
shake it, there is about displaying a menu with its own logic

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question