WordPress Admin Nav Displayed in Frontend

Does anyone know how to remove admin navigation links from an interface? I created a custom theme, and when I logged in to WordPress, WordPress adds an admin panel.

+3
source share
6 answers

Admin panel? Go to Users> Profile> Show Admin Panel. Here you can disable it from your theme. If you want to completely disable (delete) it, use one of various plugins like this .

+7
source

Or you can remove it by default in functions.php.

/* Disable the Admin Bar. */
add_filter( 'show_admin_bar', '__return_false' );

<?php function yoast_hide_admin_bar_settings() { ?>
<style type="text/css">
    .show-admin-bar {
        display: none;
    }
</style>
<?php }

function yoast_disable_admin_bar() {
add_filter( 'show_admin_bar', '__return_false' );
add_action( 'admin_print_scripts-profile.php',
     'yoast_hide_admin_bar_settings' );
}
add_action( 'init', 'yoast_disable_admin_bar' , 9 );

Thanks Yoast ( http://yoast.com/disable-wp-admin-bar/ )

+1

functions.php .

// Remove Admin Bar Front End
add_filter('show_admin_bar', '__return_false');
0
source

For wordpress 3.4.2, none of these workarounds should work. I made out a very simple trick to hide the admin panel!

After calling wp_head (), place the declaration of this style:

<style>
    html { margin-top: 0px !important; }
    * html body { margin-top: 0px !important; }
</style>

It does not include any changes to the function or anything else. Just plain old CSS! Hopefully in the near future it will solve the Googler problem :-)

0
source

Put this in your functions.php:

/* Disable WordPress Admin Bar for all users but admins. */
if(!current_user_can("manage_options")){
     show_admin_bar(false);
}
0
source

You can do this by the plugin, link below:

http://wordpress.org/plugins/global-admin-bar-hide-or-remove/

0
source

All Articles