-1

I have a submenu that contains several items. The submenu currently displays when the user hovers over a main menu item in the top menu bar.

I want to place a button in the middle of the page that, when clicked, shows a box containing the same submenu items. It would be nice if both the menu and button get the submenu items from the same place, so that we only have to modify them in one place when changes are needed.

Is there a simple way to do this?

0
  1. Make a button and a div on the page template
  2. Make the button toggle the visibility of the div
  3. When the div is toggled to be visible, have it populated by a WP_Query that fills it with menu items.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.