We’re having an issue where the sidebar doesn’t have the same accordions open when cyckling though the pages.
So if we have parent menu #1 open with a child menu, can we have it so that when we press a link and get to the new page (where the sidebar is also active) that those accordions are open instead of all being closed?
OnPoint Plugins9 months and 1 week ago
There is currently no reasonable way to track which sections of the accordion have been clicked on between pages because the accordion reloads each time a new page is viewed. That being said, there are a couple of approaches to accomplish similar behavior.
Uncheck the “Close all accordion sections until clicked” option. This will automatically open the accordion to the current page or menu item. The tradeoff is all top level sections will be open when not viewing an item included in the menu.
Normally, just the section being viewed would be open when viewing a top level section. In the case of your particular menu, the same top level item is used in multiple sections so all of the sections open when any of the top level items are viewed.
Use a filter to change the “Close all accordion sections until clicked” option based on whether you are on a child menu item or not. This will keep all sections closed when not viewing a child item included in the menu and open to the current menu section when viewing a child item.
Approach #2 may be used by adding the following filter to your active theme’s functions.php file.
Have a great day!