Support » Fixing WordPress » admin bar is blocking my hearder

Viewing 2 replies - 1 through 2 (of 2 total)
  • Ravi

    (@ravidreams)

    Go to

    /wp-admin/profile.php

    and uncheck the toolbar option.

    Disable it in your user profile, work only for you. The other users still see it. You can disable it for other users by adding this to your functions.php: show_admin_bar(false);

    However, if you don’t want to hide it, you can add this code to your functions.php:

    add_action('wp_head', 'fix_admin_bar');
    function fix_admin_bar(){
    ?>
    <script type="text/javascript">
    var $ = jQuery.noConflict();
    $(document).ready(function(){
        if ( $('#wpadminbar').length )
           $('body').css('padding-top', '28px');
    });
    </script>
    <?php
    }

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘admin bar is blocking my hearder’ is closed to new replies.