Easy way to hide blocks from public

Permalink
Hi

I made this easy way to enable editors to hide blocks from public and have a nice visual representation of it, when logged in. Works in 5.6 and 5.7

In the header.php (in your themes/elements/header.php) you add a stylesheet (I call it "mainedit.css") via php only when logged in. in there make the display and visibility of a class (I called it ".ausblenden") = true

In your general stylesheet (main.css) make ".ausblenden" hidden
Make sure main.css loads first (before the mainedit.css)

The editor only has to add the class "ausblenden" to the block via design > tab "css" to hide it from public.

the additional ":before" adds some helping text for the editor.

Hop you like it, too.

1 Attachment

abra100pro