# Dropdown menu items created regardless of subitems being present in the menu structure

**URL:** <https://forum.pinegrow.com/t/dropdown-menu-items-created-regardless-of-subitems-being-present-in-the-menu-structure/8566>\
**Category:** WordPress\
**Created:** [December 14, 2023, 8:10pm UTC](https://forum.pinegrow.com/t/dropdown-menu-items-created-regardless-of-subitems-being-present-in-the-menu-structure/8566 "2023-12-14T20:10:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Roel](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/roel/32/1753_2.png) [@Roel](https://forum.pinegrow.com/u/Roel)\
**Post date:** [December 14, 2023, 8:10pm UTC](https://forum.pinegrow.com/t/dropdown-menu-items-created-regardless-of-subitems-being-present-in-the-menu-structure/8566/1 "2023-12-14T20:10:09Z")

</div>

I generated a menu with the use of the Piengrow WordPress menu action. It has a few dropdowns and for these dropdowns I created a placeholder element that the action correctly identifies as the dropdown template. However, if there are no subitems present in the menu structure beneath a main title, it still generates the template, only here with the placeholder values (which do not link to anywhere as these href attributes are empty.) How can I make it so that the action leaves out the dropdown element when there are no sub items present?

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/6/6800b91e10d9f5130dda0504cf8b2480bd57d561.png)

---

<div class="post-metadata">

**Author:** ![Plunky](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/plunky/32/5705_2.png) [@Plunky](https://forum.pinegrow.com/u/Plunky)\
**Post date:** [December 15, 2023, 3:06am UTC](https://forum.pinegrow.com/t/dropdown-menu-items-created-regardless-of-subitems-being-present-in-the-menu-structure/8566/2 "2023-12-15T03:06:50Z")

</div>

**You must have 2 `<li>`** , different in your menu structure:

- one structured as a _dropdown menu_ and another as a _simple menu_.

In your structure, I see that all `<li>` contain a `<ul>` that acts as a submenu.

**You should create another, simpler** `<li><a href="#">Simple menu item</a></li>`, **which does not contain an ul.submenu**.

By doing this, when you use the wordpress “Menu” action and assign the “Menu item with dropdown” option to your dropdown menu, Pinegrow will recognize the other remaining `<li>` as an item without a dropdown.

> **That's your menu structure:**
>
> ![code1](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/8/8405f52e5cac4adc395ca8cc6535f1ab83f3c92b.png)

> **How it should be**
>
> ![code2](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/a/a0e3dcb790d657da09dd439a34e36ff1c9d03612.png)
