menus - How to display a submenu as a popup when clicking a button?

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

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?

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?

Share Improve this question asked Jun 9, 2019 at 17:13 Ryan GriggsRyan Griggs 1095 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 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.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745421997a4627005.html

相关推荐

  • menus - How to display a submenu as a popup when clicking a button?

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

    5小时前
    30

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信