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