Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save Lego2012/12b49a1aedb1db3e391b115da62b9eae to your computer and use it in GitHub Desktop.

Select an option

Save Lego2012/12b49a1aedb1db3e391b115da62b9eae to your computer and use it in GitHub Desktop.
// Show WP admin bar in Bricks editor.
add_action("init", function () {
    // if this is not the outer frame, abort
    if (!bricks_is_builder_main()) {
        return;
    }

    add_filter("show_admin_bar", "__return_true");
});
/* --- Show WP admin bar in Bricks editor */

body.admin-bar #bricks-toolbar {
   top: var(--wp-admin--admin-bar--height);
}

#bricks-structure {
   top: calc(40px + var(--wp-admin--admin-bar--height));
}

.bricks-panel,
#bricks-preview,
#bricks-structure {
   height: calc(100vh - 40px - var(--wp-admin--admin-bar--height));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment