• Resolved Webprom Design

    (@webprom)


    Hi!

    Looks like it’s not showing private subpages withing pages Gutenberg block. Is there some code to show them?

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor OnPoint Plugins

    (@onpointplugins)

    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 2 years ago by OnPoint Plugins. Reason: Formatting borke
    Thread Starter Webprom Design

    (@webprom)

    Great, thank you very much for the snippet!
    It works. There is no usual indication on the private posts, like “Private:” but ok ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to display also private or draft pages to admins?’ is closed to new replies.