How to Make the Multisite My Sites List Scroll - Fast Fix Web Design
Fast Fix Web Design Recommends WP Rocket For Fast Page Loading as a Result of Tons of Client Experience!
multisite dropdown my sites list

How to Make the Multisite My Sites List Scroll

How to Make the Multisite My Sites List Scroll

If you look at the number of pre-built model websites I offer, you can see why I started looking for “How to Make the Multisite My Sites List Scroll”! I find it a strange thing that the issue of the “My Sites” menu in a multisite WordPress implementation hasn’t been addressed in the WordPress core. I would have thought that this would be a problem for a lot of people who offer WordPress hosting through multisite. But it looks like I’m wrong. I have only found one place where it is seriously addressed by the core developers:

My Sites limited to 23 sites on Admin Bar

Here’s the code they suggest as a patch to fix the problem:

 * Make the My Sites list scroll if too many blogs
function custom_my_sites() {
  $user_id = get_current_user_id();
  $user_blogs = get_blogs_of_user( $user_id );
  if (count($user_blogs) > 12) {
     echo '<style type="text/css">
      #wp-admin-bar-my-sites-list {
        max-height: 90vh;
        overflow-y: auto;
        overflow-x: visible;
      #wpadminbar .menupop li.hover {
        position: relative;
      #wpadminbar .menupop li.hover > .ab-sub-wrapper {
        margin-left: 337px;
        margin-top: -32px;
        position: fixed;
add_action('admin_head', 'custom_my_sites');

I implemented the code and it works although not “elegantly”. The center scroll tends to simultaneously make the background window scroll at the same time.

How to Make the Multisite My Sites List Scroll

WP2Social Auto Publish Powered By :
Scroll to Top
  •  Free Elementor Template JSON File    Demo

    This One Page Business Website is meant to be used with the Elementor Canvas Template. Using the Elementor Responsive Settings, the main header menu disappears on mobile phones and becomes a vertical menu under the logo.

    Free One Page Business Site Elementor Template