If Is Gutenberg Page Php Wp

function is_gutenberg() {

  global $post;

  if ( function_exists( 'has_blocks' ) && has_blocks( $post->ID ) ) {
   return true;
  } else {
   return false;
  }
 }

Leave a Comment