How to display also private or draft pages to admins?

Hi Webprom,

You may add the following filter to your active theme’s functions.php file to enable private posts in menus for logged in users.

add_filter( 'advanced-sidebar-menu/list-pages/parse-args', function( $args ) {
	if ( is_user_logged_in() ) {
		$args['post_status'] = [ 'publish', 'private' ];
	return $args;
} );

More info may be found here.

Have a great day!

  • This reply was modified 15 minutes ago by OnPoint Plugins. Reason: Formatting borke


This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer