I have a menu and just added some nested items but they're currently only showing in one row. Any ideas why they're not nesting even though they are nested in the Wordpress menu dashboard.

Here's the code I'm using to call the menu

 <ul class="w-full justify-center mb-4 mt-16 font-sans uppercase hidden lg:flex under-menu -mx-5 tn-menu">
                     <?php foreach(wp_get_nav_menu_items('header') as $item): ?>
                     <li class="px-3"><a href="<?php echo $item->url ?>"><?php echo $item->title; ?></a></li>
                     <?php endforeach; ?>
                    <?php } ?>

Any help is greatly appreciated.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.