• Resolved Max Ziebell

    (@max-ziebell)


    Steps to reproduce:

    1.)
    Branda –> Admin Bar –> Toolbar Visibility

    2.)
    Disable all user groups and only enable admins

    3.)
    Now edit a page in Elementor and the Admin bar shows up

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Imran – WPMU DEV Support

    (@wpmudev-support9)

    Hello @max-ziebell !

    Hope you’re having a good day!

    I checked this issue on my test site and got similar results, although this seems to be also producing different results on different tests I did. Looks like a potential clash between the filters used to set the admin bar’s visibility. I’ll report this to our Branda team to check further and see if there’s anything we can do on our end or if it’s purely related to something Elementor is doing.

    One note – I’ve checked various settings on the “Admin Top Bar” option in Elementor >> Settings >> Experiments and didn’t get reliable results that way as well.

    There is an option in Branda >> Admin Area >> Admin Bar you may want to try out and see if that works for you (I had mixed results) – Improve page builder compatibility. Please try by adding “elementor-preview” there.

    I did find another possible solution/workaround for now if the other option doesn’t work for you, using a code snippet:

    add_action( 'elementor/editor/wp_head', function() {
            if(!current_user_can('manage_options')) { ?>
    <style type="text/css">
            #wpadminbar { display: none !important; }
    </style>
    <?php
            }
    } );

    This will add a bit of CSS to override the settings so that the admin bar shows only for administrators when editing a page/post in Elementor.

    If you are using a child theme, you can add this code to the end of the child theme’s functions.php. If not, you can add this code as a mu-plugin by placing the code in a .php file (any name will work, just the extension must be .php) in wp-content/mu-plugins:

    <?php
    
    add_action( 'elementor/editor/wp_head', function() {
            if(!current_user_can('manage_options')) { ?>
    <style type="text/css">
            #wpadminbar { display: none !important; }
    </style>
    <?php
            }
    } );

    Hope this helps!

    Kind regards,
    Pawel

    Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @max-ziebell

    I hope you are doing well and safe!

    We haven’t heard from you in a while, I’ll mark this thread as resolved.

    Feel free to let us know if you have any additional questions or problems.

    Best Regards
    Patrick Freitas

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘The admin bar is visible in Elementor’ is closed to new replies.