Only show admin bar to administrators

| Last Updated: | In: WP Labs


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.

Tags: , ,


About: Prem Tiwari

Prem Tiwari is the founder of freewebmentor.com and is a professional developer who has vast experience in PHP and open source technologies. Apart from this, he is a blogger by hobby.


You may also like:

Get Free Access of 450+ Scripts

Don't worry you'll not be spammed!

Featured eBook

WordPress Security Guide

Free Guide: Learn how to implement security guideline in your WordPress site...

DOWNLOAD

Free WordPress Setup Service

Free WordPress Setup

Want to Setup WordPress Blog Setup? I will help you in the setup of your WordPress blog.

Click Here

Pincode Finder

pincode-finder tool

Online Pincode Finder

Best tool to locate post Office address and pincodes of all india...

SEARCH NOW