How to fix WordPress Header Overlapping in admin

How to fix WordPress Header Overlapping in admin

How to fix WordPress Header Overlapping in admin


Every Developer nightmare is your application or website not working the way they should the same rules applies to WordPress Developer. As beginners developing your shiny WordPress theme for your blog, personal website or practice website you might have run into a famous bug of WordPress Header Overlapping in Admin. Yes, it’s quite common and below is how you can fix it with the breeze.

function name_your_function($classes){
    if(is_user_logged_in()){
        $classes[] = 'body-logged-in';
    }
    return $classes;
}
add_filter('body_class', 'name_your_function');

Add the above code to your functions.php, the code checks if you are logged in and if you are logged in it will add the class name body-logged-in to your body class in your theme and all you need to do next is style it in your style.css or you can just paste CSS code to your additional CSS under customizer

body.body-logged-in { top: 30px !important; }

Let me know if that works in the comment section.


Tags:

95media

I am a WordPress Developer and an amateur photographer. I love to use the best tools and gear to create the best possible projects. Since I am learning what the best tools are, I want to teach others how can increase the quality of their end results.

namecheap cheap domains
template monster theme

We will send you a free Wordpress Theme

when you subscribe to our newsletter