Customising the WordPress Admin Experience
Liam Jay
Designer, Code Monkey,
Cyclist, Gamer, Coffee Addict
at Love Creative UK
The WordPress Admin Area
Why bother?
If only the dashboard was given as much love as the rest of the site!
You can never be sure how users will think it works
Ordinary people need
to know how to use it
Remove. Simplify.
You'll feel like you're
losing valuable stuff
but it sets you free!
Removing via
'Screen Options'
Screen Options
Removing the Default Dashboard Widgets
Remove the default dashboard widgets
Goes in your functions.php file
function remove_dashboard_meta() {
remove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' );
remove_meta_box( 'dashboard_plugins', 'dashboard', 'normal' );
remove_meta_box( 'dashboard_primary', 'dashboard', 'side' );
remove_meta_box( 'dashboard_secondary', 'dashboard', 'normal' );
remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );
remove_meta_box( 'dashboard_recent_drafts', 'dashboard', 'side' );
remove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' );
remove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' );
remove_meta_box( 'dashboard_activity', 'dashboard', 'normal');
}
add_action( 'admin_init', 'remove_dashboard_meta' );
Almost Blank Dashboard
Remove the Welcome Panel
Goes in your functions.php file
remove_action( 'welcome_panel', 'wp_welcome_panel' );
Totally Blank Dashboard
Or is it?
Remove the Screen Options Tab
Goes in your functions.php file
add_filter('screen_options_show_screen', '__return_false');
Totally Blank Dashboard
Or is it?
Remove the Help Tab
Goes in your functions.php file
add_action('admin_head', 'mytheme_remove_help_tabs');
function mytheme_remove_help_tabs() {
$screen = get_current_screen();
$screen->remove_help_tabs();
}
Totally Blank Dashboard :)
Removing the Default WordPress Widgets
Widgets Screen
Something bad is bound to happen!
Remove the default WordPress widgets
Goes in your functions.php file
function unregister_default_widgets() {
unregister_widget('WP_Widget_Pages');
unregister_widget('WP_Widget_Calendar');
unregister_widget('WP_Widget_Archives');
unregister_widget('WP_Widget_Links');
unregister_widget('WP_Widget_Meta');
unregister_widget('WP_Widget_Search');
unregister_widget('WP_Widget_Text');
unregister_widget('WP_Widget_Categories');
unregister_widget('WP_Widget_Recent_Posts');
unregister_widget('WP_Widget_Recent_Comments');
unregister_widget('WP_Widget_RSS');
unregister_widget('WP_Widget_Tag_Cloud');
unregister_widget('WP_Nav_Menu_Widget');
}
add_action('widgets_init', 'unregister_default_widgets');
Blank Widgets Screen
Removing Sidebar Menu Items
Sidebar Menu
Remove Sidebar Menu Items
Goes in your functions.php file
function remove_menus(){
remove_menu_page( 'index.php' ); //Dashboard
remove_menu_page( 'edit.php' ); //Posts
remove_menu_page( 'upload.php' ); //Media
remove_menu_page( 'edit.php?post_type=page' ); //Pages
remove_menu_page( 'edit-comments.php' ); //Comments
remove_menu_page( 'themes.php' ); //Appearance
remove_menu_page( 'plugins.php' ); //Plugins
remove_menu_page( 'users.php' ); //Users
remove_menu_page( 'tools.php' ); //Tools
remove_menu_page( 'options-general.php' ); //Settings
}
add_action( 'admin_menu', 'remove_menus' );
Blank Sidebar Menu
Remove ONE Sidebar Menu Item
Goes in your functions.php file
function remove_comments_menu() {
remove_menu_page( 'edit-comments.php' );
}
add_action( 'admin_menu', 'remove_comments_menu' );
Remove the Comments menu
Sidebar Menu Without Comments
Removing
the Comments
Count Column
Comments Count Column
Remove the Comments Count Column
Goes in your functions.php file
add_action( 'init', 'my_custom_init' );
function my_custom_init() {
remove_post_type_support( 'post', 'comments' );
remove_post_type_support( 'page', 'comments' );
}
Removed Comments Count Column
Remove the Edit, View, Bin and
Quick Edit Links
Edit, Quick Edit, Bin and View Links
Remove the Edit, Quick Edit, Bin and View Links within Posts Admin
Goes in your functions.php file
add_filter( 'post_row_actions', 'remove_row_actions', 10, 1 );
function remove_row_actions( $actions ) {
if( get_post_type() === 'post' )
unset( $actions['edit'] );
unset( $actions['view'] );
unset( $actions['trash'] );
unset( $actions['inline hide-if-no-js'] );
return $actions;
}
Removed Links
Customising
the TinyMCE
(the WYSIWYG editor)
TinyMCE 4
Expanded
Default
Remove All TinyMCE Items
Goes in your functions.php file
function my_format_TinyMCE( $in ) {
$in['remove_linebreaks'] = false;
$in['keep_styles'] = true;
$in['accessibility_focus'] = true;
$in['media_strict'] = false;
$in['paste_remove_styles'] = false;
$in['paste_remove_spans'] = false;
$in['paste_strip_class_attributes'] = 'none';
$in['wpeditimage_disable_captions'] = true;
$in['plugins'] = 'tabfocus,paste,media,fullscreen';
$in['content_css'] = get_template_directory_uri() . "/editor-style.css";
$in['wpautop'] = true;
$in['apply_source_formatting'] = false;
$in['block_formats'] = "Paragraph=p; Heading 3=h3; Heading 4=h4";
$in['toolbar1'] = 'bold,italic,strikethrough,bullist,numlist,blockquote ';
$in['toolbar2'] = 'formatselect,underline,alignjustify,forecolor ';
$in['toolbar3'] = '';
return $in;
}
add_filter( 'tiny_mce_before_init', 'my_format_TinyMCE' );
Full List Here: https://codex.wordpress.org/TinyMCE
Remove Some TinyMCE Items
Goes in your functions.php file
function my_format_TinyMCE( $in ) {
$in['toolbar1'] = 'bold,italic ';
$in['toolbar2'] = '';
return $in;
}
add_filter( 'tiny_mce_before_init', 'my_format_TinyMCE' );
Full List Here: https://codex.wordpress.org/TinyMCE
TinyMCE 4
Pruned
Default
Improve Security
(by removing stuff)
The Plugin and Theme Editor
Disable the Plugin
and Theme Editor
Goes in your wp-config.php file
define('DISALLOW_FILE_EDIT', true);
Updates
Disable Updates and Installations
Goes in your wp-config.php file
define('DISALLOW_FILE_MODS',true);
Liam Jay
Customising the WordPress Admin Experience
By Liam Jay
Customising the WordPress Admin Experience
- 1,138