WordPress.org

Ready to get started?Download WordPress

Forums

admin bar is blocking my hearder (3 posts)

  1. mandraagora
    Member
    Posted 1 year ago #

    The admin bar cuts off the top of my header. Anyone know how to fix thisa?

  2. Ravi
    Member
    Posted 1 year ago #

    Go to

    /wp-admin/profile.php

    and uncheck the toolbar option.

  3. gidd
    Member
    Posted 1 year ago #

    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
    }

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags