0 %

Disable admin bar wordpress ( No Plugins )

Disable admin bar wordpress ( No Plugins )
show_admin_bar( false );

Placing the above line of code in theme's functions.php file will prevent the Toolbar from rendering on the front end of your site.

You can also determine for which users the admin bar is shown. For example the following lines will only display the admin bar for users with administrative privileges.

if ( ! current_user_can( 'manage_options' ) ) {
    show_admin_bar( false );
}

With newer version of WordPress you may need to use the following which will leave the Toolbar available in the Dashboard but hide it on all front facing pages.

add_filter('show_admin_bar', '__return_false');
Việt Lâm Coder

Việt Lâm Coder

Senior Fullstack & System Architect

Cần hỗ trợ website? Gọi / Zalo 0944.71.4545.

Trao đổi về dự án của bạn!

VietLamCoder CMS — Nền Tảng Quản Trị Flat-File Siêu Tốc LamWeb.com.vn — Hệ Sinh Thái Thiết Kế Web & Kho Giao Diện 2026