Tagged: ,

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #25561

    I have a few child-pages that I want to keep from appearing in the sidebar menu. I don’t want to have to create a custom menu. Is there a way to keep certain pages from appearing in the sidebar?

    You can see my example here: http://josueblanco.com/nwaps/membership/

    I would like to keep the registration pages hidden away, but keep all the other pages in the sidebar.

    #127386

    You can use following filter to exclude pages from the sidebar – add the code to the bottom of functions.php

    add_filter('avia_sidebar_menu_args', 'avia_exclude_sidebar_pages',10, 2);
    function avia_exclude_sidebar_pages($args, $post)
    {
    $args['exclude'] = '20,25,30';
    return $args;
    }

    and replace 20,25,30 with the page ids of the pages you want to remove from the sidebar menu…

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Keep certain pages from appearing in sidebar’ is closed to new replies.