Over the years, Elegant Themes has created a robust ecosystem of optional products designed to enhance your Divi website-building experience. These products include Premade Layouts, Divi Cloud, Divi AI, Divi Teams, and the Divi Marketplace. All these tools are displayed on the Divi Dashboard screen for you to consider using. However, you may have various reasons for wanting to hide these features, especially from clients. Since Divi does not offer a native option to manage this, we have added this option in Divi Assistant. I’ll also share a way you can hide these items from Divi Dashboard with a code snippet. In this tutorial, I will show you how to hide the upsells in the Divi Dashboard by using a code snippet or Divi Assistant.
▶️ Please watch the video above to get all the exciting details! 👆
Did you want to hide the entire Divi Dashboard?
The current tutorial is only about hiding the upsells section from the Divi Dashboard. If you want to hide the entire Divi Dashboard and menu item, please check our other tuorial about How To Hide The Divi Dashboard.
Add A PHP Code Snippet To Your Site To Hide The Upsells In The Divi Dashboard
To hide the Elegant Themes upsells from the Divi Dashboard with code, you can use the PHP snippet below. We have instructions for where to paste PHP code if you are not familiar with it. Just remember to be careful, as PHP can cause issues if not implemented properly. After adding this snippet to your site, you can refresh the browser and the Dashboard menu item will be removed from the Divi menu in your WordPress dashboard.
Where To Paste The PHP Code
1. Divi Assistant
If you are using our Divi Assistant plugin, simply paste the code in the PHP tab in the custom code window in the Divi Visual Builder.
2. Child Theme
If you are using a child theme, paste this code into the functions.php file. If you don't have a child theme, you can generate a child theme directly on your site or download our free child theme.
3. Code Snippet Plugins
Otherwise, install a dedicated code snippet plugin, create a new snippet, and paste this code into the PHP code editor.
If you need help understanding where to paste the code, please check out our complete guide about where to add custom PHP code snippets in Divi.
add_action( 'init', function() {
add_action( 'admin_enqueue_scripts', function() {
$hideDiviDashboard = "#et-onboarding .dashboard .dashboard-devider, #et-onboarding .dashboard .toolkit {display: none!important;}";
wp_register_style('pac-da-hide-divi-dashboard', false, [], '1.0.0');
wp_enqueue_style('pac-da-hide-divi-dashboard');
wp_add_inline_style('pac-da-hide-divi-dashboard', $hideDiviDashboard);
});
});
Code Explanation
This code adds a style block to the WordPress admin area that hides specific elements in the Divi Dashboard screen. The code hooks into WordPress’s initialization process to enqueue a custom style and then injects CSS to hide the targeted Divi Dashboard elements, ensuring they don’t display.
How To Hide The Divi Dashboard Using Divi Assistant
Here are the simple steps to hide the Divi Dashboard using our popular Divi Assistant plugin:
- Install and activate the Divi Assistant plugin
- Click on the Visual Builder Helper tab and the Upsells subtab
- Enable the setting
I hope that is easy enough for you! 😉
0 Comments