D
D
DmitryLife2020-06-20 15:20:34
WordPress
DmitryLife, 2020-06-20 15:20:34

Why is the menu container not being removed in WP?

Good afternoon.

Inserting a menu in WP. I write the parameters through an array:

wp_nav_menu( array(
  'theme_location'  => 'main-menu',
  'menu'            => '', 
  'container'       => false, 
  'container_class' => 'some', 
  'container_id'    => '',
  'menu_class'      => 'headerpage__ul', 
  'menu_id'         => 'headerpage__ul',
  'echo'            => true,
  'fallback_cb'     => 'wp_page_menu',
  'before'          => '',
  'after'           => '',
  'link_before'     => '',
  'link_after'      => '',
  'items_wrap'      => '<ul id="%1$s" class="%2$s">%3$s</ul>',
  'depth'           => 0,
  'walker'          => '',
) );


But the container does not disappear. Moreover, menu_class is assigned to the container, and not to the ul tag.

With what it can be connected?

Screenshot of the code on the site?
5eedfee59a044342278776.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
KingAnton, 2020-06-20
@DmitryLife

Write down the parameter
'container' => 'ul',

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question