Skip to content

Instantly share code, notes, and snippets.

Avatar
🤔
Overthinking things since 1978

Torsten Landsiedel Zodiac1978

🤔
Overthinking things since 1978
View GitHub Profile
@Zodiac1978
Zodiac1978 / style.css
Last active Mar 13, 2021
Responsiveness Spalten-Block anpassen - CSS-Lösung für das hier beschriebene Problem: https://die-netzialisten.de/responsiveness-spalten-block-anpassen/
View style.css
/*
Sources:
https://stackoverflow.com/questions/8720931/can-css-detect-the-number-of-children-an-element-has
https://lea.verou.me/2011/01/styling-children-based-on-their-number-with-css3/
*/
@media (min-width:600px) and (max-width:781px) {
.wp-block-column:first-child:nth-last-child(3) {
flex-basis: 100% !important;
}
@Zodiac1978
Zodiac1978 / functions.php
Created Feb 8, 2021
Remove divi shortcodes from attached pages in Germanized for Woocommerce plugin mails
View functions.php
<?php
/**
* Just return the content
*
* @param [string] $atts Unused attributes.
* @param [string] $content Submitted content.
* @return [string] Unmodified content with shortcodes because of nested shortcodes.
*/
function divi_remove_shortcodes( $atts, $content ) {
@Zodiac1978
Zodiac1978 / custom-editor-style.css
Last active Feb 4, 2021
Override editor colors in (twenty eleven) child theme
View custom-editor-style.css
/*
Theme Name: Twenty Eleven
Description: Custom colors.
*/
body {
color: #fff;
background: #ddd;
}
@Zodiac1978
Zodiac1978 / projekt26-2021.md
Last active Apr 24, 2021
Teilnehmerinnen und Teilnehmer sowie alle Beiträge zur #Projekt26 Challenge im Jahr 2021
View projekt26-2021.md

Am 28.12.2019 habe ich mit einem Tweet zur #Projekt26 Challenge herausgefordert. Alle zwei Wochen bloggen und kommentieren, über Wordpress oder Verwandtes, in Deutsch oder Englisch. Auch in 2021 geht es weiter!

Alle Details dazu in diesem Artikel: https://torstenlandsiedel.de/2019/12/28/projekt26-jetzt-erst-recht/

Und das Fazit aus dem Jahr 2020: https://torstenlandsiedel.de/2020/12/13/das-projekt26-geht-bald-zu-ende/

KW 15+16

KW 13+14

@Zodiac1978
Zodiac1978 / sample.html
Last active Jan 18, 2021
Gutenberg sample content ased on https://artisanthemes.io/sample-content-blocks-gutenberg/ but with working placeholders (WIP)
View sample.html
<!-- wp:paragraph {"align":"center","backgroundColor":"very-light-gray","fontSize":"small"} -->
<p class="has-text-align-center has-very-light-gray-background-color has-background has-small-font-size"><p style="color:#000000;text-align:center" class="has-background has-small-font-size has-very-light-gray-background-color">Gutenberg Sample Content.<br>Put together with ❤️ by <a href="https://artisanthemes.io/">Artisan Themes</a> and me.</p></p>
<!-- /wp:paragraph -->
<!-- wp:heading {"level":1} -->
<h1>This is a heading (H1)</h1>
<!-- /wp:heading -->
<!-- wp:heading -->
<h2>This is a heading (H2)</h2>
@Zodiac1978
Zodiac1978 / custom-toolbar.php
Created Dec 5, 2020
Add new menu for custom toolbar items
View custom-toolbar.php
<?php
/**
* Plugin Name: Custom Toolbar
* Description: Add custom toolbar items in frontent to check page and/or site.
* Plugin URI: https://torstenlandsiedel.de
* Version: 1.0
* Author: Torsten Landsiedel
* Author URI: http://torstenlandsiedel.de
* Licence: GPL 2
* License URI: http://opensource.org/licenses/GPL-2.0
@Zodiac1978
Zodiac1978 / functions.php
Created Nov 5, 2020
Add Divi markup to fix restrict content.
View functions.php
<?php
/**
* Add Divi markup to fix restrict content.
*/
function divi_compatibility( $content ) {
global $post, $current_user;
$hasaccess = pmpro_has_membership_access( null, null, true );
@Zodiac1978
Zodiac1978 / .htaccess
Created Sep 4, 2020
Got an error for "Specify a character set early for .woff2" (https://gtmetrix.com/specify-a-character-set-early.html) - how to fix this in your .htaccess
View .htaccess
# MIME Mappings
AddType font/woff .woff
AddType font/woff2 .woff2
@Zodiac1978
Zodiac1978 / q.css
Created Aug 24, 2020 — forked from glueckpress/q.css
Localized quotation marks for <q> element.
View q.css
/* Default quotation mark fallback:
* "This is a quotaion."
*/
q::before {
content: open-quote;
}
q::after {
content: close-quote;
}
@Zodiac1978
Zodiac1978 / custom-pattern.php
Created Aug 22, 2020
Custom Pattern for Antispam Bee: Everything is spam with 6 numbers only *and* yandex.ru or yandex.com in the email field:
View custom-pattern.php
<?php
/**
* Plugin Name: Custom Patterns for Antispam Bee
* Description: Add custom patterns for Antispam Bee.
* Plugin URI: https://torstenlandsiedel.de
* Version: 1.0
* Author: Torsten Landsiedel
* Author URI: https://torstenlandsiedel.de
* Licence: GPL 2
* License URI: http://opensource.org/licenses/GPL-2.0