WordPress.org

Ready to get started?Download WordPress

Forums

Advanced Sidebar Menu
[resolved] display a menu of subpages from a page ID (2 posts)

  1. M One
    Member
    Posted 9 months ago #

    Any way of using this plugin to display a list of subpages of any page by ID rather than bu current location.

    i.e. I would like to display a sidebar menu of pages from a specific section of the site on the homepage.

    Many Thanks.

    http://wordpress.org/plugins/advanced-sidebar-menu/

  2. Mat Lipe
    Member
    Plugin Author

    Posted 9 months ago #

    Hi M One,

    You should be able to do this by use a filter like so.

    add_filter('advanced_sidebar_menu_top_parent', 'always_same_top' );
    function always_same_top(){
        $parent = 'put ID here';
    
        if( is_home() || is_front_page() ){
            return $parent;
        }
    }

    If you add this to your theme's functions.php file and change 'put ID here' to the page id you would like to use as the parent.

    Hope this helps!

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.