This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Angebot-Nachfrage-Buttons nach Sprache ausgeben. | |
*/ | |
add_action( 'wp_footer', function() { | |
if( get_locale() == 'de_DE' ) { ?> | |
<a href="/angebote/" class="sticky-divi-button">Angebote</a> | |
<a href="/anfrage/" class="sticky-divi-button-2">Anfragen</a> | |
<?php } elseif( get_locale() == 'it' ) { ?> | |
<a href="/it/offerta/" class="sticky-divi-button">Offerta</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Die folgenden Zeilen in die functions.php des aktiven Child-Themes kopieren. | |
add_filter( 'the_password_form', 'custom_password_form' ); | |
function custom_password_form() { | |
global $post; | |
$label = 'pwbox-'.( empty( $post->ID ) ? rand() : $post->ID ); | |
$o = '<form action="' . esc_url( site_url( 'wp-login.php?action=postpass', 'login_post' ) ) . '" class="post-password-form" method="post"> | |
<p class="pw-notice">Bitte beachten Sie, dass das Absenden eines Passworts ein <b>Cookie</b> in ihrem Browser setzt, das sich 10 Tage lang Ihren Zugang "merkt".<br></p> | |
<label class="pass-label" for="' . $label . '">Passwort: </label> <input name="post_password" id="' . $label . '" type="password" style="background: #ffffff; border:1px solid #999; color:#333333; pad$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Copy the block below into your child theme's functions.php | |
*/ | |
// Add another posttype to Divi's blog module listings. | |
add_action( 'pre_get_posts', 'divi_child_add_post_type_to_blog_module', 12 ); | |
function divi_child_add_post_type_to_blog_module( $wp_query ) { | |
$slug = 'blog-module'; // ADJUST! => on which page to enable ... | |
$cpt = 'project'; // ADJUST! => desired additional post type |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .htaccess | |
######################################################################## | |
#### ONLY ONE OF THE NEXT TWO BLOCKS BELOW IS FOR YOU! Don't copy both!! | |
######################################################################## | |
# Redirect to https://www - PLEASE ADJUST YOUR DOMAIN NAME (RewriteRule line)! | |
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteCond %{HTTPS} !=on [OR] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Send copy to Divi's contact form sender. | |
*/ | |
add_filter( 'et_contact_page_headers', 'change_et_contact_page_headers', 10, 3 ); | |
function change_et_contact_page_headers( $headers, $contact_name, $contact_email ) { | |
$headers[] = 'Cc: ' . $contact_email; | |
return implode( "\n", $headers ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Bloom without Google webfonts | |
Description: Remove Bloom fonts loaded from Google | |
Author: Frank | |
Version: 0.1 | |
*/ | |
defined( 'ABSPATH' ) || die(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Cookie-abhängiger Tracking-Code: Google Analytics und Facebook-Pixel. | |
* | |
* Falls Autoptimze installiert ist, wird der JS-Code | |
* auch minimiert (empfohlen). | |
* | |
* ACHTUNG: FB-Pixel-ID "12345678901234" und Google-Analytics-ID "UA-xxxxxxxxxx" | |
* müssen unten im Code natürlich angepasst werden!! | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Impressum-Link zum Privacy Policy Link auf Login-Seite hinzufügen (wp-login.php). | |
*/ | |
add_filter( 'the_privacy_policy_link', function( $link, $privacy_policy_url ) { | |
return $link . ' | <a href="/impressum/">Impressum</a>'; | |
}, 10, 2 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// paste directly above: "/* That's all, stop editing! Happy blogging. */" | |
define('WP_DEBUG', true ); | |
if ( WP_DEBUG ) { | |
define( 'SAVEQUERIES', true ); | |
define( 'SCRIPT_DEBUG', true ); | |
define( 'WP_DEBUG_LOG', true ); | |
define( 'WP_DEBUG_DISPLAY', false ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Copy the code below into your Divi child(!) theme's functions.php | |
/** | |
* Disable external font load from Google. | |
* | |
* Useful after putting Google fonts on your own server; | |
* see https://google-webfonts-helper.herokuapp.com/fonts | |
*/ |
NewerOlder