R
R
Ruslan Dasaev2019-02-20 16:23:52
CMS
Ruslan Dasaev, 2019-02-20 16:23:52

How to add div after ul using wordpress?

Hello. How in this layout:

<div class="top-menu">
          <?php 
                wp_nav_menu( [
                'theme_location'  => 'top',
                'container'       => null, 
                // 'container_class' => '', 
                // 'container_id'    => '',
                // 'menu_class'      => 'ten', 
                // 'menu_id'         => '',
                // 'before'          => '',
                // 'after'           => '<div class="cleaner"></div>',
                'items_wrap'      => '<ul id="%1$s" class="%2$s">%3$s</ul>',
                'depth'           => 1,
                'walker'          => '',
              ] );

             ?>
             <div class="cleaner"></div>
             </div>

remove the div with the menu class, which automatically comes between ul and div class="top-menu"? The line 'container' => null doesn't help.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
R
Ruslan Dasaev, 2019-02-20
@Cloud47

I solved it by simply inserting the .menu class between .top-menu and ul into style.css. I don't know how kosher the solution is, we'll see.

O
Orkhan Hasanli, 2019-02-20
@azerphoenix

Hello!
https://wordpress.stackexchange.com/questions/3775...
judging by the source above, this is due to the fact that you are referring to a non-existent theme_location => 'top'
Look at the link there various solutions are proposed

R
Roma741, 2019-02-20
@Roma741

try instead of null 'container' => false,

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question