WordPress admin menu display glitch in Google Chrome

后端 未结 6 1503
轻奢々
轻奢々 2021-02-05 19:37

A recent update to Google Chrome seems to be causing issues with my WordPress admin menus.

This is happening on all sites, whether in local development or on t

6条回答
  •  后悔当初
    2021-02-05 20:23

    This issue has very recently been fixed in Chrome 45.0.2454.93 so there should be no need to use this if you have the latest version of Chrome

    The code below is only left in for reference.


    You can fix this with CSS:

    function chromefix_inline_css()
    { 
      wp_add_inline_style( 'wp-admin', '#adminmenu { transform: translateZ(0); }' );
    }
    
    add_action('admin_enqueue_scripts', 'chromefix_inline_css');
    

    Add that to your theme functions.php file and it should fix the problem. There's no check for the Chrome browser specifically, but it appears this fix has no adverse effect on other browsers, so no harm done.

    If you just want a plugin to do it: https://github.com/raffjones/chrome-admin-menu-fix

提交回复
热议问题