Home Forums WordPress, blogging, SEO Hiding admin bar

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #5496 Reply
    Jim Worrall

    Hi Roland,

    In the post https://rawinfopages.co.uk/how-to-disable-the-wordpress-admin-bar-for-users-on-your-site/

    This doesn’t work for me:

    if ( ! current_user_can( ‘manage_options’ ) ) {
    show_admin_bar( false );

    It hides the menu bar even for admin.  I also tried ‘edit_posts’ as the capability but still killed admin bar for everyone.  Any thoughts?

    #5497 Reply
    Jim Worrall

    Or does it need to be inside a function called by something?

    #5498 Reply
    Jim Worrall

    Hold on – now it’s working.  Don’t understand why it didn’t the first time.  Thanks for posting this.

    #5499 Reply
    Roland Waddilove

    You got it sorted before I got around to answering your question. Sounds like everything is OK now.

    When making changes to your site, remember that there may be a cache plugin, a CDN and a browser cache. It depends on the setup, but you may not immediately see any changes you make. It can take several minutes or even an hour before the old page is replaced with the new one. If you know how to clear caches, that enables you to see changes straight away.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Hiding admin bar
Your information: