OnPoint Plugins

  • Plugins
    • Advanced Sidebar Menu
      • Basic Version
        • Documenation
        • Usage
        • Developer Docs
      • PRO Version
        • Demo
        • Usage
        • Developer Docs
    • Go Live Update Urls
      • Basic Version
        • Documenation
        • Usage
        • Troubleshooting
      • PRO Version
        • Demo
        • Usage
        • URL History
  • About
    • Services
    • Showcase
  • Blog
  • Contact
  • Support
  • Log In
← Back to support

Only display child pages of current page

Resolved

Requested: 7 years and 3 weeks ago

I’ve installed Advanced Sidebar Menu Pro and set up the Advanced Sidebar Pages Menu in my right sidebar.

I’ve checked “Display current page’s parents only”  – and experimented with the other options, but it keep including sibling and parent pages.

I only want links to child pages of the current page.

What am I doing wrong?

Plugin: Advanced Sidebar Menu

  1. Avatar for OnPoint PluginsOnPoint Plugins

    7 years and 3 weeks ago

    Hi Louis,

    If you add the following filter to your active theme’s function.php file the menu will display the current page’s children only.

    add_filter( 'advanced_sidebar_menu_top_parent', 'asm_children_only' );
    function asm_children_only( $top ) {
       if ( is_page() ) {
          return get_queried_object()->ID;
       }
    
       return $top;
    }

    If you wish to also include the current page you may use the “Display Highest Level Parent” option. Leaving this option unchecked will not display the current page.

    Have a great weekend!

    Mat Lipe

New Response Cancel reply

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

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

  • Plugins
  • Blog
  • Contact