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 badges1 Answer
Reset to default 0- Make a button and a div on the page template
- Make the button toggle the visibility of the div
- 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
评论列表(0条)