Skip to content

Instantly share code, notes, and snippets.

View gmmedia's full-sized avatar

Jochen Gererstorfer gmmedia

View GitHub Profile
<?php
/**
* Removes WooCommerce scripts and styles from non-WooCommerce pages,
* excluding specific pages by post ID.
*/
add_action('wp_print_scripts', 'my_remove_woo_assets', 999);
add_action('wp_enqueue_scripts', 'my_remove_woo_assets', 999);
@gmmedia
gmmedia / PHP Mailer Configuration for WordPress.php
Created November 29, 2022 20:28 — forked from nextab/PHP Mailer Configuration for WordPress.php
Just define the globals in wp-config.php and add the code snippet in your functions.php to send e-mails via SMTP instead of the regular php mailer.
Folgenden Code unter übliche wp-config-.php-Befehle einfügen: (Auf All-Inkl angewandt - andere Host-Daten müssten dementsprechend angepasst werden...)
define( 'SMTP_USER', 'm05f2ew1' ); // Postfach-Benutzer
define( 'SMTP_PASS', 't3stpwd' ); // Postfach-Passwort
define( 'SMTP_HOST', 'w01c1234.kasserver.com' ); // Postein- und Ausgangsserver
define( 'SMTP_FROM', 'mail@example.com' ); // Gewünschte E-Mail-Adresse zum Versenden
define( 'SMTP_NAME', 'Example Website' ); // Webseiten-Name
define( 'SMTP_PORT', '465' ); // SMTP-Port - häufig 465 oder 587 (auch 25, aber unsicher)
define( 'SMTP_SECURE', 'ssl' ); // Verschlüsselungstyp (auch tls möglich)
define( 'SMTP_AUTH', true ); // SMTP-Authentifikation
@gmmedia
gmmedia / 0_reuse_code.js
Created April 2, 2017 08:53
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console