OnPoint Plugins

  • Plugins
    • Advanced Sidebar Menu
    • Go Live Update Urls
  • About
    • Services
    • Showcase
  • Blog
  • Contact
  • Support
  • Log In
← Back to support

hiding Grandchildren only when on top level menu page

Resolved

Requested: 9 months and 4 weeks ago

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:

View post on imgur.com

 

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 );

 

Plugin: Advanced Sidebar Menu

  1. OnPoint Plugins

    9 months and 4 weeks ago

    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!

  2. Deanne Holzman

    9 months and 4 weeks ago

    Thanks alot, that is just what we needed.

New Response Cancel reply

You must be logged in to respond. Only PRO members are allowed to respond to support requests.

© 2023 · WordPress Development · Terms Of Service · Privacy Policy · Cookie Policy · Log in

  • Plugins
  • Blog
  • Contact