How to thoroughly remove the WordPress front-end management toolbar

Source: Internet
Author: User
Obviously, most WordPress users do not like to see the WordPress management panel of the website's front-end. of course, there are also many ways to remove the front-end management panel, such as the methods that WPMEE introduced in this article: how to add a user in the management toolbar

Obviously, most WordPress users do not like to see the WordPress management panel of the website's front-end. of course, there are also many ways to remove the front-end management panel, such as the methods that WPMEE introduced in this article: how to add a custom link to the management toolbar involves how to remove the front-end management toolbar. However, they only disable the management bar so that the display: none of the management Bar, JS and CSS are not completely removed. Here we will show you how to completely remove the wordpress front-end management toolbar, including JS and CSS code.

Put the following code in your topic's functions. php to completely remove the wordpress front-end management 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 ('admin _ 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 _ admin_bar_style_frontend ', 99) ;}} add_action ('init', 'df _ disable_admin_bar ');

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.