Sidebar> through the widget added 4 drop-down menus and 2 entries. Is it possible to combine these four menus in one block (div)?

<?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?> <div id="secondary" class="widget-area" role="complementary"> <?php dynamic_sidebar( 'sidebar-1' ); ?> </div><!-- #secondary --> <?php endif; ?> 

enter image description here

  • Paste the code from the file that is responsible for the sidebar in your template into the question. - Valery Emelyanov
  • @ Valery Yemelyanov interposed the code - Timofey

1 answer 1

If I understand correctly, it will look like this ( div class="newdiv" ).

 <?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?> <div id="secondary" class="widget-area" role="complementary"> <div class="newdiv"> <?php dynamic_sidebar( 'sidebar-1' ); ?></div> </div><!-- #secondary --> <?php endif; ?> 
  • Thank you for such a record, you may need it in the future. But you probably did not understand me that way. The entire sidebar is 4 menus and 2 entries. You are now just stuck again 6 elements in div). If I’d like to take the menu as a div, I don’t need to touch the records. If I understand correctly, this cannot be done - Timofey
  • Theoretically, add two more "Text" widgets. One before the menus, the other after. In the first register the opening diva, and in the last closing. But I cannot vouch for this) - Valery Emelyanov