Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Harish Chouhan

    (@hchouhan)

    Hello fonziconnzi,

    Yes that is possible. WordPress has some default functions with which we can check if a user is admin or not based on what actions they can perform. Please find the same code below. You can add it to the bottom of your “functions.php” located in the theme that is active on your website.

    add_filter( 'mctb_show_bar', function( $show ) {
    	return !current_user_can( 'update_core' );
    } );

    Do test it and let me know if it works.

    This worked for me. Thank you.

    Thread Starter fonziconnzi

    (@fonziconnzi)

    Hi, thanks for supplying the above solution, however this function no longer seems to work since upgrading to the latest version of the plugin.

    Furthermore, if the plugin is enabled, it disables my admin bar.

    Please could you let me know if there is a way I can fix this?

    Many thanks.

    I have the same problem as fonziconnzi. The latest version of the Top Bar plugin won’t let me use the WP Admin bar. It’s not a huge deal but annoying. It used to work fine before I updated the plugin BTW.

    Plugin Author Danny van Kooten

    (@dvankooten)

    Hey everyone,

    I’m looking into this early this week and will hopefully push out an update for it that addresses this. Can you let me know what theme you’re running?

    Thanks in advance!

    Thank you Danny. I am running the 2014 theme.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Hide top bar when logged in as admin’ is closed to new replies.