How to Disable the Welcome Panel in the WordPress Dashboard

Home » Snippets » How to Disable the Welcome Panel in the WordPress Dashboard
0

Created with:

Visibility: 

public

Creator: WPTurbo Team

Customize with WPTurbo AI
X

Add Snippet To Project

New Project
Add To Existing Project

Are you tired of seeing the welcome panel every time you log in to your WordPress dashboard? The welcome panel can be useful for new users, but it can quickly become a nuisance for experienced WordPress developers and webmasters. In this article, we’ll show you how to disable the welcome panel on your WordPress dashboard, so you can have a cleaner and more efficient workspace.

					function wpturbo_disable_welcome_panel() {
    remove_action('welcome_panel', 'wp_welcome_panel');
}
add_action('admin_init', 'wpturbo_disable_welcome_panel');
				

The code snippet provided is used to disable the welcome panel in the WordPress dashboard. In this section, we will explain how the code works step by step.

The first part of the code defines a new function called wpturbo_disable_welcome_panel(). This function will be responsible for removing the welcome panel from the dashboard.

Inside the function, we use the remove_action() function to remove the action wp_welcome_panel from the welcome_panel hook. This action is responsible for displaying the welcome panel in the dashboard.

By removing this action, we effectively disable the welcome panel from being displayed.

The second part of the code uses the add_action() function to hook the wpturbo_disable_welcome_panel() function into the admin_init action. The admin_init action is triggered when the admin area is initialized.

By hooking our function into this action, we ensure that the welcome panel is disabled whenever the admin area is loaded.

Overall, this code snippet provides a simple and effective way to disable the welcome panel in the WordPress dashboard. By removing the action responsible for displaying the welcome panel, we prevent it from being shown to users.

Register an account to save your snippets or go Pro to get more features.