K
K
Kirill2018-08-03 15:52:14
WordPress
Kirill, 2018-08-03 15:52:14

How to remove all wrappers from wp_nav_menu()?

The thing is, I write everything right.

$args = array(
   'theme_location'  => '',
   'menu'            => '',
   'container'       => false,
    'container_class' => '',
    'container_id'    => '',
    'menu_class'      => '',
    'menu_id'         => '',
    'echo'            => true,
    'fallback_cb'     => 'wp_page_menu',
    'before'          => '',
    'after'           => '',
    'link_before'     => '',
    'link_after'      => '',
    'items_wrap'      => false,
    'depth'           => 0,
    'walker'          => '',
 );
  wp_nav_menu( $args );

But it still doesn't work, what should I do?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex-1917, 2018-08-03
@TeslaGogol

google for the lazy

<?php wp_nav_menu( array( 'items_wrap' => '%3$s', 'container' => false ) ); ?>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question