Forums

[resolved] WordPress stantard bar - Remove it ! (4 posts)

  1. heijmeijer
    Member
    Posted 6 months ago #

    The WordPress 3.2 has a bar as standard for users of the site, but would like to remove it.

    I managed to remove the administrators of the site, but it continues to subscribers visible.

    I added the following code in functions.php:

    add_filter( ‘show_admin_bar’, ‘__return_false’ );

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

    function maist_disable_admin_bar() {
    add_filter( ‘show_admin_bar’, ‘__return_false’ );
    add_action( ‘admin_print_scripts-profile.php’,
    ‘maist_hide_admin_bar_settings’ );
    }
    add_action( ‘init’, ‘maist_disable_admin_bar’ , 9 );

    ?>

    How to remove all types of user of the site?

    Sry my english,

    Thx! :D

  2. keesiemeijer
    moderator
    Posted 6 months ago #

    You only need this in your theme's functions.php to disable the admin bar for all users:

    show_admin_bar( false );
  3. heijmeijer
    Member
    Posted 6 months ago #

    Worked!

    Thanks!

  4. keesiemeijer
    moderator
    Posted 6 months ago #

    No problem. Glad you got it resolved.

Reply

You must log in to post.

About this Topic