If you have troubles since the update to WordPress 4.5 please read this post before opening a new thread.
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.
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';
and replace 20,25,30 with the page ids of the pages you want to remove from the sidebar menu…
The topic ‘Keep certain pages from appearing in sidebar’ is closed to new replies.