Skip to content

Instantly share code, notes, and snippets.

View fschmittlein's full-sized avatar

Frank Schmittlein fschmittlein

View GitHub Profile
@seoagentur-hamburg
seoagentur-hamburg / .htaccess
Last active May 5, 2024 06:11
UPDATE 2024/03: Perfect .htaccess file for highspeed and security. You can use it for every WordPress-Website without problems. Highspeed and Security - testet on hundreds of Websites. If you are using a WordPress Multisite, change the last part of this file.
########################################################################
# OPTIMAL .htaccess FILE FOR SPEED AND SECURITY @Version 2.0.9 - 03/2024
# ----------------------------------------------------------------------
# @Author: Andreas Hecht
# @Author URI: https://seoagentur-hamburg.com
# License: GNU General Public License v2 or later
# License URI: http://www.gnu.org/licenses/gpl-2.0.html
########################################################################
@johnbillion
johnbillion / wp_mail.md
Last active January 27, 2024 14:06
WordPress Emails

WordPress Emails

This document lists all the situations where WordPress sends an email, along with how to filter or disable each email.

This documentation has moved here: https://github.com/johnbillion/wp_mail

@Zodiac1978
Zodiac1978 / toolbox.md
Last active June 29, 2023 12:48
List of useful online tools for website QA
@manuelhudec
manuelhudec / woocommerce-display-cross-selling-products-in-single-product-summary.php
Last active February 14, 2023 22:52
WooCommerce - Display Cross-Selling Products in Single Product Summary
add_action('blocksy:woocommerce:product-single:excerpt:after', 'show_cross_sell_in_single_product', 30);
function show_cross_sell_in_single_product(){
$crosssells = get_post_meta( get_the_ID(), '_crosssell_ids',true);
if(empty($crosssells)){
return;
}
$args = array(
'post_type' => 'product',
@manuelhudec
manuelhudec / woocommerce-custom-tabs-per-product.php
Last active January 5, 2023 02:03
WooCommerce custom tabs per product
// Use the following code and paste it into the Code Snippets plugin or functions.php of your child theme.
// After that you will find a new meta box in the WooCommerce products.
// Everything you enter there will appear in the single product as a new tab.
// In line 17 you can give your meta box a title
// In line 88 you can give your tab a title
// Adding a custom Meta container to admin products pages
add_action( 'add_meta_boxes', 'create_custom_meta_box' );
@MailPoet-Staff
MailPoet-Staff / sign-up-confirmation
Last active February 27, 2022 15:50
MailPoet signup confirmation email
<!doctype html><html><head><meta charset="UTF-8"><title>Thanks for signing up</title></head><body bgcolor="#ffede3">
<table width="100%" cellpadding="0" cellspacing="0" border="0" bgcolor="#ffede3"><tr><td>
<table width="600" align="center" cellpadding="0" cellspacing="0" border="0" bgcolor="#ffffff"><tr><td colspan="3"><a href="http://www.mailpoet.com"><img style="display:block;border:0;outline:none;-ms-interpolation-mode:bicubic;" src="https://www.mailpoet.com/wp-content/uploads/2019/01/mailpoet-logo-orange-header.png" width="600" height="118" alt="MailPoet" /></a></td></tr><tr><td width="20"></td>
<td style="color:#071c6d;font-family:arial,sans-serif;font-size:15px;">
<b>Hello!</b>
Thanks for signing up.
@manuelhudec
manuelhudec / blocksy-theme-jquery-filter-subcategories.php
Last active February 24, 2022 12:51
Blocksy Blog or CPT live jQuery filter (show only subcategories)
<script>
jQuery(document).ready(function($) {
$('.ct-filter').on( 'click', function(event){
var $type = $(this).data("filter");
if($type == "all"){
$('.entry-card').fadeOut(0);
$('.entry-card').fadeIn(500);
} else {
$('.entry-card').hide();
// For CPTs just change the category class to your CPTs slug for example: '.projects-'
@manuelhudec
manuelhudec / blocksy-theme-preload-fonts.php
Created June 1, 2021 18:42
Blocksy Theme - Preload Fonts
add_action( 'wp_head', function () {
?>
<link rel="preload" href="/wp-content/uploads/blocksy/local-google-fonts/s/opensans/v20/mem8YaGs126MiZpBA-UFVZ0bf8pkAg.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="/wp-content/uploads/blocksy/local-google-fonts/s/opensans/v20/mem5YaGs126MiZpBA-UNirkOUuhpKKSTjw.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="/wp-content/uploads/blocksy/local-google-fonts/s/poppins/v15/pxiByp8kv8JHgFVrLCz7Z1xlFd2JQEk.woff2" as="font" type="font/woff2" crossorigin>
<?php } );
@manuelhudec
manuelhudec / client-portal-logout-redirect.php
Created June 1, 2021 18:53
Client-Portal.io - Logout Redirect
function my_leco_cp_logout_url() {
// return the preferred URL.
return home_url();
}
add_filter( 'leco_cp_logout_url', 'my_leco_cp_logout_url' );
function my_leco_cp_client_portal_archive() {
return 'Ihre Projekte';
}
add_filter( 'leco_cp_client_portal_archive', 'my_leco_cp_client_portal_archive' );
@manuelhudec
manuelhudec / client-portal-portal-role.php
Created June 1, 2021 18:54
Client-Portal WP Plugin - Admin and store customers also as customer portal role
function my_leco_cp_client_roles( $roles ) {
$roles = array_merge( $roles, array( 'administrator', 'customer' ) );
return $roles;
}
add_filter( 'leco_cp_client_roles', 'my_leco_cp_client_roles' );