Disable Full Site Editing (FSE)

add_action( ‘admin_menu’, function() { remove_submenu_page(‘themes.php’, ‘site-editor.php’); }); add_action(‘admin_bar_menu’, function($wp_admin_bar) { $wp_admin_bar->remove_node(‘site-editor’); }, 250); add_action(‘admin_init’, function() { global $pagenow; if (‘site-editor.php’ === $pagenow) { wp_safe_redirect(admin_url()); exit; } });Continue reading

Disable Posts in Admin

add_action( ‘admin_bar_menu’, function ( $wp_admin_bar ) { $wp_admin_bar->remove_node( ‘new-post’ ); }, 100 ); add_action( ‘admin_menu’, function () { remove_menu_page( ‘edit.php’ ); } );Continue reading

Move Admin Bar to the Bottom

body {margin-top: -28px;padding-bottom: 28px;} body.admin-bar #wphead {padding-top: 0;} body.admin-bar #footer {padding-bottom: 28px;} #wpadminbar { top: auto !important;bottom: 0;} #wpadminbar .menupop .ab-sub-wrapper { bottom: 32px; }Continue reading

Disable Fullscreen Editor

add_action( ‘enqueue_block_editor_assets’, function () { $script = “jQuery( window ).load(function() { const isFullscreenMode = wp.data.select( ‘core/edit-post’ ).isFeatureActive( ‘fullscreenMode’ ); if ( isFullscreenMode ) { wp.data.dispatch( ‘core/edit-post’ ).toggleFeature( ‘fullscreenMode’ ); } });”; wp_add_inline_script( ‘wp-blocks’, $script ); } );Continue reading