Removing the Help and Customiz’it admin bar buttons


Note :This snippet works only with the Classical style option. The Classical style option can be enabled in Appearance > Customize > Advanced > Theme Style. More about the theme style option here


Update : the Customiz’it button has been removed since v3.1.12 of the theme

 

Howdy developer!

Even if I have tried to style them as good as I could  :-?, some of you might be bothered by the help and customiz’it buttons in the top admin bar. Or may be you just don’t want your client to see them?

Anyway, here’s a quick snippet to get rid of those.

 

Where to copy/paste this code? Answer : in your functions.php file (of a Customizr child theme). The best way to customize a theme in WordPress is to create a child theme. Everything you need to know about child theme creation in Customizr here

 

 

Following @hugh comment, here’s an update of the callback function to remove those buttons for non-admin users only  :

 

And they are gone! Hope this helps you guys!


Related Snippets you may also like


We can help you to implement this snippet

Coding is our job and we know WordPress inside and out. We can help you to customize your website with small chunks of code snippets like this one.

Send us your request and we'll get back to you quickly.



10 thoughts on “Removing the Help and Customiz’it admin bar buttons

  • Marius Botha

    Hi Guys, sorry to post here, I am not getting this code to work. It gives a fatal error on TC-customize. Can you help.

    By the way, a great theme.

    Regards

    Marius

  • Hugh

    Is there a way to only apply this filter to roles less than “admin”/”god”. Not letting the client see them is good. But I do like them as the dev.

  • Samuel

    Hi there! That is me again!

    Now just repeatig my previous request to you Nicolas!

    Teach me how to use functions.php and apply to my Customizr Theme because I have niticed that , with php, I wil be able to perform many interesting changes in my WordPress.

    Thanks again,

    Samuel

  • James King

    I pasted the above code, and it made no changes. I’m already using a child theme to add a function in functions.php, and that other function is definitely working. I pasted this code into the same child functions.php and nothing has changed. Any thoughts?

    • Nicolas Post author

      Hi James and thanks for this feedback. The code actually needed a correction because it was only working in admin but not for the frontend.
      I replaced this line :

      By this :

      And now they are gone everywhere.

      Thanks for pointing this out and enjoy the theme.

  • Denis Charron

    Thanks Nicolas. The buttons were handy and I know you thought you were doing the right thing. But I have now removed them because my admin bar had so many buttons from other plugins that it was folding onto two lines. I only wish other developers provided similar code.

    FYI I discovered that the presence of the admin bar caused the slider to work differently. It seemed to be doing vertical auto cropping. When I removed the admin bar I found that the auto cropping stopped. I tested it using images with grid lines to see the exact effect. I tried various sizes of images to see if that made any difference but it didn’t. The cause must have been the admin bar.

Comments are closed.