# WordPress Menu with Submenu Dropdown

**URL:** <https://forum.pinegrow.com/t/wordpress-menu-with-submenu-dropdown/6753>\
**Category:** Feature Request\
**Created:** [August 3, 2022, 2:58pm UTC](https://forum.pinegrow.com/t/wordpress-menu-with-submenu-dropdown/6753 "2022-08-03T14:58:03Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![adamslowe](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/adamslowe/32/4590_2.png) [@adamslowe](https://forum.pinegrow.com/u/adamslowe)\
**Post date:** [August 3, 2022, 2:58pm UTC](https://forum.pinegrow.com/t/wordpress-menu-with-submenu-dropdown/6753/1 "2022-08-03T14:58:03Z")

</div>

The current wp\_smart\_navwalker does a great job of making top-level menu items but doesn’t do anything to let you create or style sub-menus. The only way I’ve seen to make dropdown submenus (even common single-level ones) easily is to use the Bootstrap framework, and the custom walker Pinegrow built for it. Those of us using Tailwind or no framework are left out in the cold.

Granted, WordPress will create a ul \> li \> ul for any submenus, but they only have a class of “sub-menu” and don’t carry over any classes or attributes from Pinegrow. It’s easy enough to make CSS rules to take care of basic styles but even doing something like adding an aria-expanded=“false” attribute now has to be done with some janky javascript when the page loads.

The current system also copies the same classes from the ul \> li elements to ul \> li \> ul \> li. I know that I like to have different hover styles for submenus, so this is especially problematic.

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

In my opinion, this is one of the biggest shortcomings of Pinegrow’s theme creation features. I’ve had to rely on 3rd party plugins like Max Mega Menu to make my menus, and I’d love to remove that dependency.

As a side note: The Help button in the Nav Menu action goes to the old documentation site, which is no longer available. [Here is a link](https://notes.peakperformancedigital.com/share/7363180/axfy5xobmb3068dwkui7) to the text of the old article that I saved from the wayback machine.

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

---

<div class="post-metadata">

**Author:** ![Pinegrow\_Learner](https://avatars.discourse-cdn.com/v4/letter/p/df705f/32.png) [@Pinegrow\_Learner](https://forum.pinegrow.com/u/Pinegrow_Learner)\
**Post date:** [August 3, 2022, 2:59pm UTC](https://forum.pinegrow.com/t/wordpress-menu-with-submenu-dropdown/6753/2 "2022-08-03T14:59:32Z")

</div>

Yes. This is much needed.

---

<div class="post-metadata">

**Author:** ![matjaz](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/matjaz/32/5_2.png) [@matjaz](https://forum.pinegrow.com/u/matjaz)\
**Post date:** [August 4, 2022, 11:55am UTC](https://forum.pinegrow.com/t/wordpress-menu-with-submenu-dropdown/6753/3 "2022-08-04T11:55:34Z")

</div>

Yes, we need this. Thinking about it, should be possible to support at least 1 level of dropdowns with Smart walker.

The task has two parts:

- Updating the PHP Smart menu walker
- Updating the Menu action to be able to figure out additional template elements

I have to do the 2nd one, but the 1st one is open to any hero who wants to try 🙂 Just let us know so that we don’t duplicate the effort.

---

<div class="post-metadata">

**Author:** ![adamslowe](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/adamslowe/32/4590_2.png) [@adamslowe](https://forum.pinegrow.com/u/adamslowe)\
**Post date:** [August 4, 2022, 1:55pm UTC](https://forum.pinegrow.com/t/wordpress-menu-with-submenu-dropdown/6753/4 "2022-08-04T13:55:41Z")

</div>

As much as I’d love to try, I suspect it would kick my butt pretty quickly. I’ll have one of my devs take a look though, and put them on it if it seems reasonable.

---

<div class="post-metadata">

**Author:** ![Pinegrow\_Learner](https://avatars.discourse-cdn.com/v4/letter/p/df705f/32.png) [@Pinegrow\_Learner](https://forum.pinegrow.com/u/Pinegrow_Learner)\
**Post date:** [August 21, 2022, 1:38pm UTC](https://forum.pinegrow.com/t/wordpress-menu-with-submenu-dropdown/6753/5 "2022-08-21T13:38:49Z")

</div>

An aria compliant, keyboard accessible and ability to define svg icons for sub menu items will be awesome to have!

---

<div class="post-metadata">

**Author:** ![adamslowe](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/adamslowe/32/4590_2.png) [@adamslowe](https://forum.pinegrow.com/u/adamslowe)\
**Post date:** [August 21, 2022, 2:25pm UTC](https://forum.pinegrow.com/t/wordpress-menu-with-submenu-dropdown/6753/6 "2022-08-21T14:25:45Z")

</div>

I built a native menu in Pinegrow with Interactions that meets those criteria, I just haven’t done the work to make it work with WordPress yet. I’ll update this post with some sample code later today when I’m at a computer.

Sometime this week I’m going to put my guys on the job to get it working with WordPress, either via semi-ugly CSS or by modifying the WalkerMenu that ships with Pinegrow. I’d prefer a native walker solution but I suspect that it’s going to take a lot of work.

WordPress block themes (FSE themes) have a menu builder built in, but right now they are next to useless. I’m sure the Pinegrow team is keeping an eye on it to see whether there is value in extending their menu builder for classic and hybrid themes or if they should somehow put their efforts into the Block theme way of doing things.

---

<div class="post-metadata">

**Author:** ![Pinegrow\_Learner](https://avatars.discourse-cdn.com/v4/letter/p/df705f/32.png) [@Pinegrow\_Learner](https://forum.pinegrow.com/u/Pinegrow_Learner)\
**Post date:** [August 21, 2022, 3:04pm UTC](https://forum.pinegrow.com/t/wordpress-menu-with-submenu-dropdown/6753/7 "2022-08-21T15:04:58Z")

</div>

@adamslowe Hi Adam. Thank you for your awesome contribution to the Pinegrow Community. Your videos made me interested in Pinegrow. Do you know if it’s possible to load custom woo templates from a PG plugin not theme? [How to edit single post template (block based) from WP Dashboard? - #6 by matjaz](https://forum.pinegrow.com/t/how-to-edit-single-post-template-block-based-from-wp-dashboard/6732/6)

---

<div class="post-metadata">

**Author:** ![adamslowe](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/adamslowe/32/4590_2.png) [@adamslowe](https://forum.pinegrow.com/u/adamslowe)\
**Post date:** [August 21, 2022, 3:08pm UTC](https://forum.pinegrow.com/t/wordpress-menu-with-submenu-dropdown/6753/8 "2022-08-21T15:08:47Z")

</div>

Thanks! I’ll be the first to admit that WooCommerce is one of my big weaknesses (I think WP is lousy for most e-commerce applications, to be honest).

Given what I just read, I suspect it wouldn’t work with a PG plugin, but it’s worth testing. You have piqued my curiosity now so I’m going to have to test it in the next few days.

---

<div class="post-metadata">

**Author:** ![adamslowe](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/adamslowe/32/4590_2.png) [@adamslowe](https://forum.pinegrow.com/u/adamslowe)\
**Post date:** [August 22, 2022, 1:03pm UTC](https://forum.pinegrow.com/t/wordpress-menu-with-submenu-dropdown/6753/9 "2022-08-22T13:03:45Z")

</div>

FYI: Here is a repository with a sample accessible menu.  
[Demo accessible menu - https://github.com/adamslowe/pg-accessible-menu](https://github.com/adamslowe/pg-accessible-menu)

It relies on Tailwind and Pinegrow Interactions.
