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
│
<!doctype html> | |
<html class="no-js" lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="x-ua-compatible" content="ie=edge"> | |
<title></title> | |
<meta name="description" content=""> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<style type="text/css"> | |
.map { |
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 | |
$custom_post_type = 'team_profiles; | |
$tax_term = 'department'; | |
$terms = get_terms($tax_term); | |
foreach($terms as $term) : | |
?> | |
<h2><?= $term->name;?></h2> | |
<?php | |
$cat_posts_args = array( | |
'post_type' => $custom_post_type, |
<?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] |
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 |
//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. |