Skip to content

Instantly share code, notes, and snippets.

View herrseiler's full-sized avatar

Sandro Seiler herrseiler

View GitHub Profile
@herrseiler
herrseiler / disable-block-editor-widget.txt
Last active August 25, 2021 05:28
Disable the new WordPress (5.8) block editor for widgets
// This goes into the function.php
// Disables the block editor from managing widgets in the Gutenberg plugin.
add_filter( 'gutenberg_use_widgets_block_editor', '__return_false' );
// Disables the block editor from managing widgets.
add_filter( 'use_widgets_block_editor', '__return_false' );
@herrseiler
herrseiler / absolute-center-with-flexbox.css
Last active September 5, 2019 08:07
Absolute center with CSS Flexbox
.container (parent of items) {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
}
@herrseiler
herrseiler / robots.txt
Last active March 24, 2025 07:45
robots.txt (Wordpress)
Sitemap: https://[YOUR-DOMAIN]/sitemap.xml
User-agent: *
Disallow: /wp-admin/
Allow: /wp-admin/admin-ajax.php
@herrseiler
herrseiler / _mixin-vertical-align.scss
Last active February 16, 2016 12:01
Sass Mixin – Vertical Align
@mixin vertical-align {
margin: 0;
position: absolute;
top: 50%;
left: 50%;
margin-right: -50%;
transform: translate(-50%, -50%)
}
@herrseiler
herrseiler / _mixin-transition.scss
Created February 16, 2016 11:59
Sass Mixin – Transition
@mixin transition($duration) {
-webkit-transition: all $duration ease-in-out;
-moz-transition: all $duration ease-in-out;
-o-transition: all $duration ease-in-out;
-ms-transition: all $duration ease-in-out;
transition: all $duration ease-in-out;
}
@herrseiler
herrseiler / _mixin-filter.scss
Created February 16, 2016 11:57
Sass Mixin – Filter
@mixin filter($filter-type,$filter-amount) {
-webkit-filter: $filter-type+unquote('(#{$filter-amount})');
-moz-filter: $filter-type+unquote('(#{$filter-amount})');
-ms-filter: $filter-type+unquote('(#{$filter-amount})');
-o-filter: $filter-type+unquote('(#{$filter-amount})');
filter: $filter-type+unquote('(#{$filter-amount})');
}