Hi,
I know this probably goes against the plugin main functionality, but would it be possible to create an automatic accordion menu with all the pages (and their hierarchy) of the whole website?
If so, how should I proceed?
Thanks in advance!
We use cookies to allow login, checkout, and analyze site traffic. By continuing to use this website, you consent to the use of cookies in accordance with our cookie policy.
OnPoint Plugins
Hi Ricardo,
There are two approached to accomplishing. Both will require the following widget options:
The first approach requires your site have a common highest level page. All pages on your site should be children or grandchildren of this top level parent. Using the following additional widget options will make everything work:
The other approach will work if you site has various top level parent pages and does not require all pages to be children or grandchildren of a common parent. First set the following addition widget options:
You will then need to use a template override in your theme to change the structure of the menu
advanced-sidebar-menu
.page_list.php
.You menu will then contain all top level pages and their children with accordion functionality.
geral
Hi,
Thank you so much for your reply!
I tried approach 2 and while it works to make a site map, however it also applies to all the other menus and I definitely don’t want that. Is it possible to apply this new behaviour to just one accordion id?
Thanks again!
OnPoint Plugins
Hi Ricardo,
If you would like to target a specific widget you may add this code near the top of the template and change the id to match your widget:
If you would like to target a specific sidebar you may add this code near the top of the template and change the id to match your sidebar:
The end result will be something like this: