Open app/setup.php
, find the after_setup_theme
action and put add_theme_support('woocommerce');
inside the function.
Add the templates you want to override in resources/woocommerce
:
theme
│
afghanistan : Afghanistan | |
albania : Albania | |
algeria : Algeria | |
american_samoa : American Samoa | |
andorra : Andorra | |
angola : Angola | |
anguilla : Anguilla | |
antigua_and_barbuda : Antigua and Barbuda | |
argentina : Argentina | |
armenia : Armenia |
<?php | |
/* | |
Plugin Name: ACF Customizer Patch | |
Plugin URI: https://gist.github.com/fabrizim/9c0f36365f20705f7f73 | |
Description: A class to allow acf widget fields to be stored with normal widget settings and allow for use in customizer. | |
Author: Mark Fabrizio | |
Version: 1.0 | |
Author URI: http://owlwatch.com/ | |
*/ | |
class acf_customizer_patch |
/*! | |
* gulp | |
* $ npm install gulp-ruby-sass gulp-autoprefixer gulp-cssnano gulp-jshint gulp-concat gulp-uglify gulp-imagemin gulp-notify gulp-rename gulp-livereload gulp-cache del --save-dev | |
*/ | |
// Load plugins | |
var gulp = require('gulp'), | |
sass = require('gulp-ruby-sass'), | |
autoprefixer = require('gulp-autoprefixer'), | |
cssnano = require('gulp-cssnano'), |
//Remove prettyPhoto lightbox | |
add_action( 'wp_enqueue_scripts', 'fc_remove_woo_lightbox', 99 ); | |
function fc_remove_woo_lightbox() { | |
remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) ); | |
wp_dequeue_style( 'woocommerce_prettyPhoto_css' ); | |
wp_dequeue_script( 'prettyPhoto' ); | |
wp_dequeue_script( 'prettyPhoto-init' ); | |
} | |
//Add fancyBox lightbox - if thats what you want. |
// articles per page | |
var limit = 10; | |
// pagination middleware function sets some | |
// local view variables that any view can use | |
function pagination(req, res, next) { | |
var page = parseInt(req.params.page) || 1, | |
num = page * limit; | |
db.articles.count(function(err, total) { | |
res.local("total", total); |
Note: Because this is my personal cheat sheet, I'm installing a few PHP modules that you may not need if you're not running SilverStripe 4.x.x. Otherwise this is a pretty standard and secure LAMP installation.
Log into the remote machine as root: ssh root@123.45.67.890
First, add the admin user.
<?php | |
/* | |
############################## | |
########### Search ########### | |
############################## | |
Included are steps to help make this script easier for other to follow | |
All you have to do is add custom ACF post types into Step 1 and custom taxonomies into Step 10 | |
[list_searcheable_acf list all the custom fields we want to include in our search query] | |
@return [array] [list of custom fields] |
// Requires modular-scale | |
=heading-sizes($max-size: 30px, $min-size: 16px, $max-heading: 1, $min-heading: 6, $ratio: 1, $debug: false) | |
$number-of-headings: $min-heading - $max-heading + 1 | |
$scaled-size-of-max-heading: modular-scale($number-of-headings - 1, $min-size, $ratio) | |
$coefficient: 0 | |
@if $ratio != 1 | |
@if modular-scale(1, 1, octave()) != 2 |