Support » Plugin: Client Portal - Private user pages and login » How to add Gutenberg support

  • Resolved lesthertod


    Hello! I’ve been trying out Client Portal, and something I noticed is that while the editor works, there was no Gutenberg support. Adding it is quite simple, on index.php at the $args array add 'show_in_rest' => true.

    It took me a couple of minutes to figure this out, so hope it helps someone!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support madalinaruzsa


    Hi @lesthertod,

    Thank you very much for your suggestion.

    Have a wonderful day.
    Kind regards,

    Even better to do it on the child theme

    add_filter( 'register_post_type_args', 'add_gutenberg_private_pages', 10, 2 );
    function add_gutenberg_private_pages( $args, $post_type )
    	if ( 'private-page' != $post_type ) return $args;
    	$args['show_in_rest'] =  true; return $args;
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.