Hi, I contacted you earlier regarding showing only current section navigation while also showing top level menu items, and also removing grandchild items which are not siblings or children of the current item. Your filter worked great and we appreciate it!
One other quick question I had was if we could add something to the filter to remove Grandchildren when on a top level page. An image that shows what I mean is here:
I looked through possibilities and tried this but it didn’t seem to work:
use Advanced_Sidebar_MenuWidget_OptionsPageCurrent_Page_Parent_Only;
remove_filter( ‘advanced-sidebar-menu/list-pages/grandchild-pages’, [
Current_Page_Parent_Only::instance(),
‘exclude_non_ancestor_pages’,
], 1 );
OnPoint Plugins
Hi Deanne,
Assuming the other support ticket you are referring to is this one, I have modified the previous filter to remove all grandchild items from the menu when viewing a top level item.
Have a great day!
Deanne Holzman
Thanks alot, that is just what we needed.