+1 vote
3.0k views
in Plugins by
I'm making a plugin on which I need to hide the admin bar (admin toolbar) from frontend, I mean if I'm logged in the backend the admin bar shows up on my frontend custom page for the plugin. How can I hide it please?

1 Answer

0 votes
by
Add this to your page, and it should do the trick.

show_admin_bar( false );

Refer here for more info https://codex.wordpress.org/Function_Reference/show_admin_bar

Related questions

0 votes
1 answer 3.7k views
0 votes
1 answer 2.0k views
+1 vote
1 answer 1.5k views
0 votes
0 answers 2.8k views
0 votes
1 answer 617 views
0 votes
2 answers 5.6k views
asked Jul 17, 2018 in General by anonymous
...