Hide WordPress Admin Bar with a Line PHP Code – WordPress Tutorial

By | July 26, 2020

If you have logged into wordpress admin dashboard, wordpress will display an admin bar on the top of your site. In this tutorial, we will use a line php code to hide it.

WordPress admin bar

WordPress admin bar looks like:

the wordpress admin bar

If you plan to hide it, we can do like this:

Open your wordpress theme function, then copy and save code below:

show_admin_bar(false);

Then you will find the admin bar is gone.

hide wordpress admin bar

However, we should notice this method can not hide the admin bar in admin dashboard page.

The admin bar is also displayed in administrator pages.

the effect of wordpress admin bar

Leave a Reply