Only show admin bar to administrators

Want to hide the admin bar from frontend in your WordPress website, then keep close attention in this post. In this post i will explain a simple code which will hide admin bar.

Open your current activated theme’s functions.php page & simply copy and paste the bellow code at the bottom of your page for hide the admin bar to all logged in users except admins. This is very useful for those sites that have public registration and login turned on.

Recommended Posts:


Prem Tiwari

An engineer by profession and a passionate blogger by heart. Founder of FreeWebMentor.com (A Programming blog for beginners), Tech Speaker at various forums. A part from this he is an open source enthusiast, WordPress Lover, Blogger, SEO, and Growth Strategic.

Article Tags: , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Solved Programs