is it possible to have the block editor only for editing posts.
I have a customer with a not so nice website – and he has a lot of posts created with block editor.
Importing the post only works propper if i do use the same editor on that.
I have now to transform this site into an enfold based website but i do not want to use in that new projekt the block-editor for pages ( if possible for portfolios neither ).
Hey Guenter,
add_theme_support( 'avia_gutenberg_post_type_support' );
– adds an additional selectbox to theme option “Editor”
– you can select for each page/post/.. which editor you want to use to edit
Best regards,
Günter
so i first do the general setting for gutenberg editor on enfold theme options tab to not use it. – and then reactivate it per post.
can i differ between post and portfolio ?
Hi,
Select Your Editor -> Use Classic Editor
Disable Block Editor For Selected Post Types:
You can only disable block editor for post tyes, means with Strg + Click select the post types you never want to use block editor.
e.g. if you select page and posts these will always open in classic editor (only “Edit” is visible),
portfolio will have “Classic Editor” and “Block Editor” links below title on “Portfolio Items” page.
Best regards,
Günter
in this combination it works
Select Your Editor -> Use Classic Editor
add_theme_support( 'avia_gutenberg_post_type_support' );
function disable_gutenberg_for_cpt($current_status, $post_type){
// Use your post type key instead of 'portfolio'
if ($post_type === 'portfolio') return false;
return $current_status;
}
add_filter('use_block_editor_for_post_type', 'disable_gutenberg_for_cpt', 10, 2);