How to remove the WordPress dashboard page and built-in gadgets

Source: Internet
Author: User
Tags wordpress dashboard
Of course, these gadgets can be removed. It is unclear how much it can help with performance, but it may be helpful to some servers with poor performance. Some friends who like simplicity do not like to hide but directly remove them.

The following describes how to remove the WordPress dashboard page and built-in gadgets.

Remove some Built-in WordPress gadgets

Just throw the following function into functions. php. Note: You can comment out one or more of the following rows based on your actual needs:

Function Yusi_remove_meta_widget () {unregister_widget ('WP _ Widget_Pages '); unregister_widget ('WP _ Widget_Calendar'); // unregister_widget ('WP _ wid_archives '); unregister_widget ('WP _ Widget_Links '); unregister_widget ('WP _ Widget_Meta'); // unregister_widget ('WP _ Widget_Search '); combine ('WP _ Widget_Text '); // unregister_widget ('WP _ Widget_Categories '); unregister_widget ('WP _ login'); unregister_widget ('WP _ Widget_RSS '); unregister_widget ('WP _ Widget_Tag_Cloud '); // unregister_widget ('WP _ Nav_Menu_Widget');/* register my custom widget */register_widget ('WP _ Widget_Meta_Mod ');} add_action ('widgets _ init ', 'yusi _ remove_meta_widget', 11 );

You can remove the code of a small tool in the WordPress background based on the actual needs of a project. If it is not commented out, it will be removed.

Remove widgets loaded on the WordPress dashboard page

Although every WordPress background administrator can close any existing tool in "option settings" at the top of the WordPress dashboard interface, for bloggers who do not know the technology, it may be better to not display these gadgets in the WordPress background.

Function Yusi_remove_dashboard_widgets () {global $ wp_meta_boxes; unset ($ wp_meta_boxes ['dashboard'] ['side'] ['core'] ['dashboard _ quick_press ']); 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'] ['normal'] ['core'] ['dashboard _ ins Ins']); unset ($ wp_meta_boxes ['dashboard'] ['normal'] ['core'] ['dashboard _ recent_drafts ']); unset ($ wp_meta_boxes ['dashboard'] ['normal'] ['core'] ['dashboard _ recent_comments ']); unset ($ wp_meta_boxes ['dashboard'] ['DD'] ['core'] ['dashboard _ primary ']); unset ($ wp_meta_boxes ['dashboard'] ['DD'] ['core'] ['dashboard _ secondary ']);} add_action ('WP _ dashboard_setup ', 'yusi _ remove_dashboard_widgets', 11 );

You can safely remove all of this, and decide whether to leave a small tool based on your needs.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.