Subscribe On YouTube

Join other subscribers and enjoy other Divi video tutorials!

How To Hide The Divi Dashboard

Nelson Miller Profile Orange
In this tutorial, I will show you how to hide the Divi Dashboard completely by removing the menu item using code or Divi Assistant.

Elegant Themes recently added a new Dashboard screen under the Divi menu, which appears by default when you click the Divi menu. This screen includes helpful links to documentation, pages, posts, templates, support, and other prompts and upsells. However, this is a change that not everyone wants, and you may prefer not to use it or have your clients access it. With our Divi Assistant plugin, we offer various features to hide upsells, including this. In this tutorial, I will show you how to hide the Divi Dashboard completely by removing the menu item using code or Divi Assistant.

▶️ Please watch the video above to get all the exciting details! 👆

Add A PHP Code Snippet To Your Site To Hide The Divi Dashboard

To hide the new Divi Dashboard menu item 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.

// Hide Dashboard code snippet
add_action( 'init', function() {
    // Restrict Page to access using direct link
    global $pagenow;
    $page = ! empty( $_GET['page'] ) ? $_GET['page'] : '';
    if (!empty($page) && $page === 'et_onboarding' && !empty($pagenow) && $pagenow === 'admin.php') {
        wp_die( esc_attr( "You don't have permission to access this page"));
    }
    // Enqueue CSS To Hide Divi Dashboard Option & Enqueue JS To Change Tab When Click Divi in Dashboard
    add_action('admin_enqueue_scripts', function() {
        // CSS
        $hideDiviDashboardCSS = "#toplevel_page_et_divi_options ul.wp-submenu li a[href='admin.php?page=et_onboarding'] {display: none!important;}";
        wp_register_style('pac-da-hide-divi-dashboard-option', false, [], '1.0.0');
        wp_enqueue_style('pac-da-hide-divi-dashboard-option');
        wp_add_inline_style('pac-da-hide-divi-dashboard-option', $hideDiviDashboardCSS);
        // JS
        ob_start();
        ?> jQuery(document).ready(function(){jQuery('a.wp-has-submenu[href="admin.php?page=et_onboarding"]').attr("href","admin.php?page=et_divi_options")}); <?php
        $hideDiviDashboardJS = ob_get_contents();
        ob_end_clean();
        wp_register_script('pac-da-change-divi-dashboard-option', '', ['jquery'], '1.0.0', true);
        wp_enqueue_script('pac-da-change-divi-dashboard-option');
        wp_add_inline_script('pac-da-change-divi-dashboard-option', $hideDiviDashboardJS);
    });
});

Code Explanation

This code snippet hides the Divi Dashboard menu item in WordPress. It does this by first blocking direct access to the Divi dashboard page and displaying a “You don’t have permission to access this page” message. It then uses CSS to hide the Divi Dashboard option from the admin menu and JavaScript to change the link of the Divi menu item to point to the Divi Theme Options page instead. This ensures that users cannot see or access the Divi onboarding page through the WordPress admin menu.

Screenshot of Divi Dashboard customization options interface

Subscribe For More Things Like This!

At the start of each month, we send out a recap newsletter from the month before with family news, Divi news, our latest tutorials, and product news. Occasionally, if the news is too exciting to wait, we will send out another email separate from the monthly newsletter. That’s what you get when you subscribe, and of course you can unsubscribe if you are no longer interested!

Blog Post Optin
Divi Logo (2)

Shop Our Divi Products

Plugins • Courses • Templates

Visit The Shop

Featured Products

Asset 4

New! Trail Guides

Follow a series of blog posts carefully arranged around a specific topic or goal! Keep track of your progress by marking posts completed, just like a free course!

View Trial Guides

Divi Trail Committee Membership badge with map design

Join The Trail Committee!

Show support for our ongoing work creating community resources at Pee-Aye Creative and enjoy exclusive member perks in return.

Learn More

Divi Tutorials On YouTube

Our videos have views! Join subscribers and enjoy over video tutorials!

Visit Our Channel

Leave A Response!

By commenting you agree to our Blog & YouTube Comments Policy

4 Comments

Comments By Others

  1. EJ

    Awesome! Quick and easy 🙂

    Reply
  2. Ivo

    Excellent. Thank you!

    Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

Recent Posts

0

Your Cart