Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

enable gutenberg for post

function shapeSpace_enable_gutenberg_post_ids($can_edit, $post) {
	
	if (empty($post->ID)) return $can_edit;
	
	if (1 === $post->ID) return true;
	
	return $can_edit;
	
}

// Enable Gutenberg for WP < 5.0 beta
add_filter('gutenberg_can_edit_post', 'shapeSpace_enable_gutenberg_post_ids', 10, 2);

// Enable Gutenberg for WordPress >= 5.0
add_filter('use_block_editor_for_post', 'shapeSpace_enable_gutenberg_post_ids', 10, 2);
Source by digwp.com #
 
PREVIOUS NEXT
Tagged: #enable #gutenberg #post
ADD COMMENT
Topic
Name
2+9 =