Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Kupası
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

Yöneticiler Dışındaki Tüm Kullanıcılar için WordPress Yönetici Çubuğu Nasıl Devre Dışı Bırakılır

Editoryal Not: WPBeginner üzerindeki ortak bağlantılardan komisyon kazanıyoruz. Komisyonlar, editörlerimizin görüşlerini veya değerlendirmelerini etkilemez. Editoryal Süreç hakkında daha fazla bilgi edinin.

WordPress yönetici çubuğunu yöneticiler hariç tüm kullanıcılar için devre dışı bırakmak mı istiyorsunuz?

Varsayılan olarak, WordPress yönetici çubuğunu bireysel kullanıcılar için kolayca devre dışı bırakabilirsiniz. Ancak sitenizde çok sayıda kayıtlı kullanıcı varsa bu işlem zaman alabilir.

Bu makalede, WordPress yönetici çubuğunu yöneticiler hariç tüm kullanıcılar için nasıl kolayca devre dışı bırakacağınızı göstereceğiz.

How to disable WordPress Admin Bar for All Users except administrators

WordPress Yönetici Çubuğu Nedir?

WordPress varsayılan olarak, oturum açmış tüm kullanıcılar için ekranın üst kısmında bir yönetici çubuğu gösterir. Hesabınıza giriş yaptığınızda, bu araç çubuğunu WordPress yönetici alanında ve diğer tüm sayfalarda görebilirsiniz.

The WordPress admin bar

WordPress yönetici araç çubuğu, WordPress’in farklı arka uç alanlarına yönelik kullanışlı kısayollara sahiptir ve bu kısayollar kullanıcının WordPress’teki rolüne ve izinlerine göre değişir.

Ancak, web sitenizin ön ucuna bakarken yönetici çubuğu dikkat dağıtıcı olabilir.

Ayrıca web sitenizin tasarımını ve kullanıcı deneyimini de etkileyebilir. Üçüncü bir taraf için bir WordPress sitesi oluşturuyor veya yönetiyorsanız bu bir sorun olabilir, çünkü web sitelerinin gerçekte neye benzediğini görmelerini engeller.

Neyse ki, yöneticiler hariç tüm kullanıcılar için yönetici çubuğunu devre dışı bırakmanın birden fazla yolu vardır. Kullanmak istediğiniz yönteme atlamak için aşağıdaki hızlı bağlantıları kullanmanız yeterlidir:

Video Eğitimi

Subscribe to WPBeginner

Yazılı talimatları tercih ediyorsanız, okumaya devam edin.

Yöntem 1: Bireysel Kullanıcılar için WordPress Yönetici Çubuğunu Devre Dışı Bırakın

Kullanıcı profillerini düzenleyerek belirli kullanıcılar için yönetici çubuğunu devre dışı bırakabilirsiniz. Yalnızca az sayıda kişi için çubuğu kaldırmanız gerekiyorsa bu hızlı ve kolay bir yöntemdir. Ancak, çok sayıda kullanıcısı olan bir üyelik sitesi işletiyorsanız, farklı bir yöntem seçmenizi öneririz.

Yönetici çubuğunu manuel olarak kaldırmak için WordPress yönetici panosundaki Kullanıcılar ” Tüm Kullanıcı lar sayfasına gidin. Ardından farenizi yönetici çubuğuna ihtiyaç duymayan kullanıcının üzerine getirin ve göründüğünde ‘Düzenle’ye tıklayın.

How to edit a user's profile in WordPress

Bu, o kullanıcının profilini açacaktır.

Buradan, ‘Siteyi görüntülerken araç çubuğunu göster’ seçeneğinin yanındaki kutunun işaretini kaldırın.

How to hide the admin toolbar for non-admin users

Bundan sonra, ekranın en altına gidin ve değişikliklerinizi kaydetmek için ‘Kullanıcıyı Güncelle’ye tıklayın. Bu, yönetici çubuğunu yalnızca söz konusu kişi için devre dışı bırakacaktır.

Araç çubuğunu daha fazla kullanıcı için gizlemek için yukarıda açıklanan aynı işlemi uygulamanız yeterlidir.

Yöntem 2: Yöneticiler Dışındaki Tüm Kullanıcılar için Yönetici Çubuğunu Devre Dışı Bırakın (Önerilen)

Yönetici çubuğunu çok sayıda farklı kişi için gizlemeniz gerekiyorsa, her kullanıcının ayarlarını manuel olarak değiştirmek çok fazla zaman ve çaba gerektirecektir.

Bu nedenle, bir WordPress tema dosyası olan functions.php dosyasına kod ekleyerek yönetici çubuğunu devre dışı bırakmanızı öneririz. Bunu daha önce yapmadıysanız, WordPress’te kod parçacıklarının nasıl kopyalanıp yapıştırılacağına ilişkin kılavuzumuza göz atın.

Bazı kılavuzlar tema dosyalarını manuel olarak düzenlemenizi söyleyecektir, ancak bu yaygın WordPress hatalarına neden olabilir ve hatta web sitenizi tamamen bozabilir.

Bu nedenle WPCode kullanmanızı öneririz. En iyi kod parçacığı eklentisidir ve sitenizi riske atmadan WordPress’e özel kod eklemeyi kolaylaştırır.

Öncelikle, ücretsiz WPCode eklentisini yüklemeniz ve etkinleştirmeniz gerekecektir. Daha fazla bilgi için, WordPress eklentisinin nasıl yükleneceğine ilişkin adım adım kılavuzumuza bakın.

Eklenti etkinleştirildikten sonra Code Snippets ” Snippet Ekle bölümüne gidin.

Hiding the admin toolbar using WPCode

Burada, sitenize ekleyebileceğiniz önceden hazırlanmış tüm parçacıkları göreceksiniz. Bu, yorumları tamamen devre dışı bırakmanıza, WordPress’in genellikle desteklemediği dosya türlerini yüklemenize, ek sayfalarını devre dışı bırakmanıza ve çok daha fazlasına olanak tanıyan bir parçacık içerir.

Bir sonraki ekranda, farenizi ‘Özel Kodunuzu Ekleyin (Yeni Snippet)’ seçeneğinin üzerine getirmeniz ve göründüğünde ‘Snippet kullan’ düğmesine tıklamanız gerekir.

Adding custom code to your WordPress website with WPCode

Bir sonraki ekranda, kod parçacığı için bir başlık yazın. Bu sadece referans içindir, bu yüzden istediğiniz herhangi bir şeyi kullanabilirsiniz.

Ardından, ‘Kod Türü’ açılır menüsünü açın ve ‘PHP Snippet’i seçin.

Adding a PHP snippet to WordPress using WPCode

Bunu yaptıktan sonra, aşağıdaki kodu editöre yapıştırmanız yeterlidir:

add_action('after_setup_theme', 'remove_admin_bar');
function remove_admin_bar() {
if (!current_user_can('administrator') && !is_admin()) {
  show_admin_bar(false);
}
}

Bu kod, şu anda yönetici kontrol paneline bakmayan yönetici olmayan kullanıcıları tanımlar. Bu kullanıcılar için WordPress yönetici çubuğunu devre dışı bırakır.

Bundan sonra, sayfayı aşağı kaydırarak ‘Ekleme’ bölümüne gelin. Burada, kodun her yerde çalıştığından emin olmak için varsayılan ‘Otomatik Ekle’ yöntemini koruyabilirsiniz.

Automatically inserting code into a WordPress website

Son olarak, ekranın üst kısmına kaydırın ve ‘Etkin Değil’ kaydırıcısına tıklayarak ‘Etkin’i göstermesini sağlayın.

Ardından, kod parçacığını canlı hale getirmek için ‘Snippet’i Kaydet’ veya ‘Güncelle’ düğmesine tıklamanız yeterlidir.

Publishing a custom code snippet to WordPress

İşte bu kadar! Her şeyin yolunda gittiğinden emin olmak için WordPress web sitenizi kontrol etmeyi unutmayın.

Yöntem 3: WordPress Yönetici Çubuğunu Yöneticiler Dışındaki Tüm Kullanıcılar İçin Devre Dışı Bırakın (Kod Gerekmez)

Web sitenize kod eklemek istemiyorsanız, bir eklenti kullanarak yönetici çubuğunu gizleyebilirsiniz. Hide Admin Bar Based on User Roles, araç çubuğunu farklı kullanıcı rollerine göre kaldırmanıza olanak tanır, bu nedenle çubuğu tüm üyeler, WooCommerce müşterileri veya başka bir kullanıcı rolü için devre dışı bırakmak istiyorsanız bu iyi bir seçimdir.

Öncelikle Hide Admin Bar Based on User Roles eklentisini yüklemeniz ve etkinleştirmeniz gerekir. Daha fazla ayrıntı için, bir WordPress eklentisinin nasıl kurulacağına ilişkin adım adım kılavuzumuza bakın.

Etkinleştirmenin ardından Ayarlar ” Yönetici Çubuğunu Gizle Ayarları sayfasına gitmeniz gerekir. Buradan, yönetici çubuğunu devre dışı bırakmak istediğiniz kullanıcı rollerinin yanındaki kutuları işaretleyin.

Hiding the admin toolbar for specific user roles

Bu işlem tamamlandıktan sonra, ayarlarınızı kaydetmek için ‘Değişiklikleri Kaydet’e tıklamanız yeterlidir.

Yöntem 4: Tüm Kullanıcılar İçin Yönetici Çubuğunu Devre Dışı Bırakın (Yöneticiler Dahil)

Site yöneticileri de dahil olmak üzere tüm kullanıcılar için yönetici çubuğunu devre dışı bırakmak istiyor musunuz?

Bunu, sitenizin genel sayfalarını görüntüleyen herkes için yönetici çubuğunu devre dışı bırakan bazı kodlar ekleyerek yapabilirsiniz. Bu, yönetici çubuğunun yalnızca WordPress kontrol paneli alanında olduğunuzda görüneceği anlamına gelir.

İşleri kolaylaştırmak için WPCode, yerleşik Kod Parçacığı Kitaplığında tam olarak ihtiyacınız olan kod parçacığına sahiptir. Basitçe Kod Parçacıkları Kütüphane‘ye gidin.

The WPCode code snippet plugin for WordPress

Burada, ‘WP Yönetici Çubuğunu Devre Dışı Bırak’ için arama yapın.

Doğru snippet göründüğünde, sadece ‘Snippet Kullan’ düğmesine tıklayın.

The ready-made Disable The WP Admin Bar code snippet

Eklenti kodu sitenize otomatik olarak ekleyecek, koda açıklayıcı bir başlık verecek, doğru ekleme yöntemini seçecek ve hatta snippet’i tanımlamanıza yardımcı olacak etiketler ek leyecektir.

İşte kodun nasıl göründüğü:

/* Disable WordPress Admin Bar for all users */
add_filter( 'show_admin_bar', '__return_false' );

Şimdi tek yapmanız gereken anahtarı ‘Etkin Değil’den ‘Etkin’e getirmek ve ardından ‘Güncelle’ye tıklamak.

Adding custom code to WordPress

Şimdi, WordPress hesabınızda oturum açmışken web sitenizin ön ucunu ziyaret ederseniz, yönetici çubuğu kaybolacaktır.

Umarız bu makale, WordPress yönetici çubuğunu yöneticiler hariç tüm kullanıcılar için nasıl devre dışı bırakacağınızı öğrenmenize yardımcı olmuştur. Ayrıca nihai WordPress güvenlik kılavuzumuzu ve herhangi bir kod kullanmadan özel sayfa düzenleri oluşturmak için en iyi WordPress sayfa oluşturucuları karşılaştırmamızı da görmek isteyebilirsiniz.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Açıklama: İçeriğimiz okuyucu desteklidir. Bu, bazı bağlantılarımıza tıklarsanız komisyon kazanabileceğimiz anlamına gelir. WPBeginner'ın nasıl finanse edildiğini, neden önemli olduğunu ve nasıl destek olabileceğinizi görün. İşte editoryal sürecimiz.

Avatar

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

Ultimate WordPress Araç Kiti

Araç setimize ÜCRETSİZ erişim sağlayın - her profesyonelin sahip olması gereken WordPress ile ilgili ürün ve kaynaklardan oluşan bir koleksiyon!

Reader Interactions

166 yorumBir Cevap Bırakın

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. ronald osoo says

    This code has bug , its working but not bullet proof . The normal user can by -pass this and get access to the user admin like panel at the top by just adding wp-admin/ to the url like trying to login

      • Steve says

        A lot of websites not only from wordpress have the same option. You can acces to the admin-login page of any website just writing example.com/admin : Thats normal. I find it’s look really good without the adminbar.

  3. Alex S says

    Hello,
    I wish your syntax highlighter was better. Tried to copy the code and got the numbers starting at 2. I don’t need your numbers, just the good code. I would use this site a lot more if this was not the case.

    Thanks.

  4. Jenn says

    This plugin was working great and I was using Theme My Login. When I deactivated that plugin it is not not functioning as before… I see the admin bar for all users. Any suggestions?

    • Jenn says

      Sorry I meant to say this ‘code’ was working great. I created a site-specific plugin as well and everything was working great. But after deactivating Theme My Login, not it seems to not have any effect and I see the admin bar on all users.

      Suggestions?

  5. Jason A. Churchill says

    I’m not well-read in editing the functions.php file. My first two attempts resulted in syntax error messages.

    Where exactly should I place this code in the functions.php file?

  6. Bhris says

    Great straight-to-the-point tutorial.

    Is there a version of the code that will block all non-users. That is, visitors to the site won’t see the bar, while all logged-in users would?

    • Karen says

      Neither worked for me. I copied the numbers with the text as I did not know that I could
      click on the button on top right corner of the code snippet and copy the raw code. I removed the numbers, but overlooked the seven. I had to change the file entry in via my file manager as I could no longer edit the functions.php. So after a scare and a bit of back and forth I removed the number and the admin bar is still there. I also tried your code Shashi, but it’s not working either. :-(
      I have tried every plugin under the sun and nothing will remove the bar.

  7. Che Boielle says

    Fastest fix to an odd issue I’ve ever found and implemented. Great explanation simple to follow instructions. Thanks guys, will be book marking your site.

  8. Nathan Jansen says

    Use this if you want this only for a certain role

    function remove_admin_bar() {
    $user = wp_get_current_user();

    if (in_array(‘subscriber’, $user->roles)) {
    show_admin_bar(false);
    }
    }

  9. Paw Pet Directory says

    I used this on my directory for my customers but the bar will not go away for them. I am using 3.8 with AppThemes Vantage Theme (Latest)

  10. Cory says

    This is one of those things that, because it’s such a small customization, I’d hate to use a plugin for. So being able to throw this short piece of code into my child theme’s functions.php made me super happy. Thanks so much far sharing! Works like a charm.

  11. Naveen says

    I have added this code it is working fine, but if a user takes meta there is an option yo view the admin, if i click on this the admin page can see, how to avoid this, i dont want to give admin panel to the users, a user can edit the url and give /wp-admin also he can see the admin, i dont want both what will do for this?

  12. Subodh says

    Admin bar is hidden but now how can a user log out?
    I am using bbpress forum and a plugin for users to log in via their Facebook account to join forum. But find no option for logging out.

  13. Loralee says

    Thanks for the great tutorial. I thought it didn’t work – and then silly me I hadn’t followed the last step to activate my new plugin!! Thanks so much for this! So much better than installing multiple new plugins.

  14. Andy Wagstaff says

    I have an area of my site that requires log-in registration.
    I have made the admin bar “autohide” by requiring a plug-in, I don’t want to entirely disable it, as I need the abiity to change password, but is there any way of removing items from the bar for users? I don’t want the site name,WP logo or the theme extensions options on the left hand side.

    Is this possible? I am sure it is, but I can’t work it out!!

    Ta!! Really handy site by the way

    Andy

  15. Ken Shoufer says

    Hello,

    Your code worked fine when I tried it locally on my computer, but when I tried it on a fresh WordPress install on my host server it would not let me log out. When I tried to log out, the address showing was “http://www.ken-shoufer.com/wordpress1/wp-login.php?action=logout&_wpnonce=9e7f51a307”.

    I’m not sure what is wrong.

  16. Nate says

    i am trying to disable the W logo on the top left, the “My Sites” menu and the dashboard link on a buddypress multisite install. I want to keep the right side functional which shows the links to their buddypress profile settings. How can I achieve this?

  17. Tanner Moushey says

    To avoid the blank space where the admin bar was, call the function in the “after_setup_theme” action instead of “init”.

  18. niki says

    Fantastic! Except I also have the blank space visible where the admin bar would be. Does anyone have a fix for this?

  19. Marlita Hill says

    Hello. Thank you for this. How would I write the code if I only want the bar accessible to admin and contributors? I still do not want the contributors to have admin access to my backend.

  20. Steve says

    Well… it removes the admin bar but it´s still occupying the space meaning there´s too much space up there now. I´m not sure it´s supposed to be that way? ;-)

  21. Nick Cokas says

    Add the code and worked perfect. However, the user still sees a white space above were the toolbar existed before. Any ideas to remove that.

    Thanks

  22. Toby Couchman says

    Did you use a plugin to place all the necessary user stuff on the frontend?

    My team recently built a site with similar requirements and I’d love to compare the processes.

    Cheers
    Toby

  23. Delton Childs says

    This is an awesome post. short, to the point and contained a useful snippet! Thank you so much!

    I’m using the S2Member plugin also, I was very concerned about compatibility issues with plugin based solutions because of the various s2Membership Levels. This solutions is working wonderfully for me.

    Thanks Again!

  24. James Davis says

    Hi Guys,

    Just found this bit of code and it worked perfect for my site…

    Thanks so much

    Cheers

    James

    AKA The Fitness Blogger

  25. glueckpress says

    Nice. For Superadmins in a Multisite install it would read like if(!current_user_can(‘manage_network’)) //etc.

Bir Cevap Bırakın

Yorum bırakmayı seçtiğiniz için teşekkür ederiz. Lütfen tüm yorumların yorum poli̇ti̇kasi uyarınca denetlendiğini ve e-posta adresinizin yayımlanmayacağını unutmayın. Ad alanında anahtar kelime KULLANMAYIN. Kişisel ve anlamlı bir sohbet edelim.