When you are using wp_head() function in header.php at the end of the section. After using it automatically CSS apply margin-top 28px or margin-top 32px or something else. in the WordPress Public Website there is a very big unnecessary space from the top bar which looks is very bad and dirty for site viewer, So how to remove that margin top. It’s very easy you have to add the following code into function.php file.
function remove_admin_login_header() {
remove_action(‘wp_head’, ‘_admin_bar_bump_cb’);
}
add_action(‘get_header’, ‘remove_admin_login_header’);
Login to your WordPress Dashboard with your WP username and password or go to the functions file inside your current theme folder from root directory and paste the above given code inside functions.php file and save the work.
Now finally removed top margin from your public website, So if you have any confusion on this article please comment us.
In the end
I hope you have found this article helpful. Let us me your opinion or questions if any through the comment form in below or use this form to ask your question.