Few WordPress Admin Panel Hacks You Must Know

No doubt WordPress is the most widely used CMS around the world, most of the popular blogs on web runs on it. If you too use WordPress and wants to customize your admin panel then here are few hacks or tricks which you can use to stand uniquely.

WordPress Tips

At this time WordPress has already reached v3.9 and soon we will see v4. You can always visit WordPress codex page to know about tweaks and hacks of WordPress but its too techy for a newbie. We had tried to compile some best tricks for you.

#1 Disable Dragging Of Metaboxes In Admin Panel

If you want to disable dragging and dropping of meta boxes so that no other user can re-position meta box then you can do it by simply deactivating its JS, for this open your functions.php

function disable_drag_metabox() {
wp_deregister_script('postbox');
}
add_action( 'admin_init', 'disable_drag_metabox' );

#2 Remove Menus From Admin Bar

When you login to your admin panel you will see a admin bar at the top of the screen which is full of menus, some of them you never use but they still sits there and make your admin bar messy. You can remove unwanted options from there by adding following code to your functions.php

function wps_admin_bar() {
global $wp_admin_bar;
$wp_admin_bar->remove_menu('wp-logo');
$wp_admin_bar->remove_menu('about');
$wp_admin_bar->remove_menu('wporg');
$wp_admin_bar->remove_menu('documentation');
$wp_admin_bar->remove_menu('support-forums');
$wp_admin_bar->remove_menu('feedback');
$wp_admin_bar->remove_menu('view-site');
}
add_action( 'wp_before_admin_bar_render', 'wps_admin_bar' );

#3 Disable Dashboard widget

When you login to your admin panel then you might see some widgets at your dashboard like WordPress Blog, Incoming Links, Plugin News and so on, but I don’t think many of us use them or ever gave a look on them. You can remove those unwanted widgets by adding following code in your functions.php

function remove_dashboard_widgets(){
global$wp_meta_boxes;
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);
}

add_action('wp_dashboard_setup', 'remove_dashboard_widgets');

#4 Disable Standard Widgets

WordPress comes with 12 standard widgets which you can use in your theme. These widgets are like Calendar, Search, Links, Archives, Recent Post and so on If you are using custom function and any third party app in place of this widgets like Google Custom Search and dont want these widgets then you can disable them by adding following code to functions.php

function remove_some_wp_widgets(){
unregister_widget('WP_Widget_Calendar');
unregister_widget('WP_Widget_Search');
unregister_widget('WP_Widget_Recent_Comments');
}

add_action('widgets_init',remove_some_wp_widgets', 1);

#5 Remove Editor Sub-Menu

WordPress allows you to edit your theme within your admin panel, its good as you can make necessary changes to your theme without log-in to your FTP account, but sometime you want to disable it so that no other users can use it and change themes functions. Open your functions.php and add following code :-

function remove_editor_menu() {
remove_action('admin_menu', '_add_themes_utility_last', 101);
}

add_action('_admin_menu', 'remove_editor_menu', 1);

#6 Add new item to admin bar

If you want to add a menu or item to your admin bar (top) then you could do it by just adding following code to your functions.php

function wp_admin_bar_new_item() {
global $wp_admin_bar;
$wp_admin_bar->add_menu(array(
'id' => 'wp-admin-bar-new-item',
'title' => __('TechnoArea'),
'href' => 'http://www.technoarea.in/'
));
}
add_action('wp_before_admin_bar_render', 'wp_admin_bar_new_item');

#7 Remove items from WordPress Admin Dashboard

WordPress Admin dashboard has lots of options on the left side bar, if you want then you can disable few or all of them as per your need, open up your functions.php and add following code into it ;-

add_action( 'admin_menu', 'remove_links_menu' );
function remove_links_menu() {
remove_menu_page('index.php'); // Remove Dashboard Option
remove_menu_page('edit.php'); // Remove Posts Option
remove_menu_page('upload.php'); // Remove Media Option
remove_menu_page('link-manager.php'); // Remove Links Option
remove_menu_page('edit.php?post_type=page'); // Remove Pages Option
remove_menu_page('edit-comments.php'); // Remove Comments Options
remove_menu_page('themes.php'); // Remove Appearance Options
remove_menu_page('plugins.php'); // Remove Plugins Options
remove_menu_page('users.php'); // Remove Users Options
remove_menu_page('tools.php'); // Remove Tools Options
remove_menu_page('options-general.php'); // Remove Settings Options
}

#8 Change WordPress Version In Admin Footer

If you are logged in as admin or any other user then you could see WordPress Version at the bottom right side of your screen, it is always recommended to remove WordPress Version from your blog so no hacker can know which version you are running, you could change version by adding following code to functions.php

function change_footer_version() {
return 'Proudly Powered By WordPress';
}
add_filter( 'update_footer', 'change_footer_version', 9999 );

#9 Change footer text in WordPress admin panel

You could change the footer text which is shown in bottom left side of the admin panel to anything which you like by adding following code to functions.php

function remove_footer_admin () {
echo 'Powered By TechnoArea';
}
add_filter('admin_footer_text', 'remove_footer_admin');

#10 Change WordPress Login page Logo

WordPress displays its logo at your blog’s login page, here is an old but good trick which allows you to change login page WordPress logo to your own, add following code to functions.php and do change img URL in line 3

function my_custom_login_logo() {
echo '<style type="text/css">
h1 a { background-image:url(/images/logo.png) !important; }
</style>';
}

add_action('login_head', 'my_custom_login_logo');

#11 Change WordPress Admin Area Logo

You could change the WordPress Admin area logo, shown at top left side of your admin panel, just add following code to functions.php, again dont forget to change image URL

function custom_logo() {
echo '<style type="text/css">
#header-logo { background-image: url(/images/admin_logo.png) !important; }
</style>';
}

add_action('admin_head', 'custom_logo');

#12 Disable WordPress Post & Page Visual Editor/WYSISYG

WordPress provides a nice visual editor which you can use to write posts and it gives you a fair idea how your post will look like after inserting images, videos or table. But if you want to disable this visual editor then you can do it by adding following code to your functions.php

add_filter('user_can_richedit' , create_function('' , 'return false;') , 50);

We missed something??? If you think we had missed something or wanna share your trick then comment below and then let the world know about it

Some handpicked devices for you