How to completely remove the WordPress Front-End admin toolbar

Source: Internet
Author: User
Keywords WordPress toolbar

Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall

Obviously, most of the WordPress users do not like to see the site front-end WordPress admin Bar Panel, of course, there are many ways to remove the front-end management panel, such as the previous Wpmee in this article introduced the method: How to add a custom link in the Admin toolbar, It's about how to move out of the front End Admin toolbar, however, they just disable the admin bar, make the display:none of the management bar, and do not move the js,css completely out of it. Here we will show you how to completely remove the WordPress Front-End admin toolbar including js,css code.

Put the following code in the functions.php of your topic to completely remove the WordPress Front-End Admin toolbar:

Disable Admin bar,www.wpmee.com

if (!function_exists (' Df_disable_admin_bar ')) {function Df_disable_admin_bar () {//For the admin page remove_action (' Ad Min_footer ', ' Wp_admin_bar_render ', 1000); For the front-end remove_action (' Wp_footer ', ' Wp_admin_bar_render ', 1000); CSS override for the admin page function remove_admin_bar_style_backend () {echo ';} add_filter (' Admin_head ', ' remove_ Admin_bar_style_backend '); CSS override for the Frontend function remove_admin_bar_style_frontend () {echo ';} add_filter (' Wp_head ', ' Remove_admi N_bar_style_frontend ', 99); } add_action (' init ', ' Df_disable_admin_bar ');

OK, refresh the page, see the admin panel using the CSS has JS is not it? Respect for the work of others, reproduced please specify: http://www.wpmee.com/remove-admin-bar/

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.