Skip to content

Instantly share code, notes, and snippets.

@simonlk
simonlk / .htaccess
Last active November 28, 2016 08:50
WordPress load uploads from external website.
# Create .htaccess file within /wp-content/uploads/ and add the below code
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} http://dev.example.com # Only perform on dev site
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) http://www.example.com/wp-content/uploads/$1 [L,P]
</IfModule>
<?php
/**
* Plugin Name: WooCommerce Subscriptions Redirect to Checkout
* Description: Redirect customers to the checkout page when adding a subscription to their cart (rather than the checkout page, which is the default).
* Author: Simon Kelly
* Author URI: http://www.renegade-empire.com
* Version: 1.0
* License: GPL v2
*/
@simonlk
simonlk / genesis-full-width-footer.php
Created January 11, 2017 02:29
Full width widgets and site footer on Genesis framework for WordPress