Instantly share code, notes, and snippets.

View gist:41f03b79252b1558d96088fc6de98b1a
/*
* Adding Parameters to Permalinks
*
*/
add_filter( 'post_type_link', 'lc_append_query_string', 10, 2 );
function lc_append_query_string( $url )
{
if(is_admin()) return $url;
$query = array();
View Import Github labels
[
{
"name": "0 - Backlog",
"color": "CCCCCC"
},
{
"name": "1 - Ready",
"color": "CCCCCC"
},
{
View PHP start - Template.php
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
View Beschreibungsfeld
<h1>Produktkategorie</h1>
<h2>Alles für die Produktkategorie</h2>
Lorem ipsum <strong>dolor sit amet</strong>, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. ▶ <a title="" href="#details">Mehr zum Thema BE-FuelSaver erfahren Sie hier</a>.
View SSL-Umstellung - .htaccess
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
View WP Clean Topbar
// **********************************************************************//
// Clean Topbar
// **********************************************************************//
add_action('wp_before_admin_bar_render', 'annointed_admin_bar_remove', 0);
function annointed_admin_bar_remove() {
global $wp_admin_bar;
/* Remove their stuff */
$wp_admin_bar->remove_menu('wp-logo');
$wp_admin_bar->remove_menu('customize');
View gist:b3be208db3668a69b6ab
sudo tmutil setdestination afp://user:pass@host/share
View remove_emails.php
add_action('woocommerce_email', 'do_not_send_some_email_notifications');
function do_not_send_some_email_notifications(WC_Emails $wc_emails) {
remove_action('woocommerce_order_status_completed_notification', array($wc_emails->emails['WC_Email_Customer_Completed_Order'], 'trigger'));
}