Skip to content

Instantly share code, notes, and snippets.

View ejntaylor's full-sized avatar
🚢
Shipping

Elliot ejntaylor

🚢
Shipping
View GitHub Profile
@ejntaylor
ejntaylor / pagination-functions.php
Last active May 17, 2020 06:06
Replace WooCommerce Default Pagination with WP-PageNavi Pagination for Woo Canvas or WooCommerce Pagination
/**
* Replace WooCommerce Default Pagination with WP-PageNavi Pagination for Woo Canvas
**/
add_action('init','alter_woo_hooks');
function alter_woo_hooks() {
remove_action( 'woocommerce_after_main_content', 'canvas_commerce_pagination', 01, 0 );
}
@ejntaylor
ejntaylor / fullwidth-custom.css
Created October 4, 2013 14:40
Adds a full width area to Woo Canvas theme
html, body {
overflow-x: hidden;
height: auto;
}
#container {
padding-right: 3000px;
margin-right: -3000px;
padding-left: 3000px;
margin-left: -3000px;
@ejntaylor
ejntaylor / 0_reuse_code.js
Created October 4, 2013 15:00
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@ejntaylor
ejntaylor / functions.php
Last active December 24, 2015 16:19
WP - Register CSS and JS for Woo Canvas
// CSS
if ( WP_DEBUG ) {
define( 'RO_VERSION', time() );
} else {
define( 'RO_VERSION', '1.0.1' );
}
// wp_enqueue stylesheet for Woo Shortcodes
<?php
/**
* Plugin Name: WooCommerce VAT
* Plugin URI: http://raison.co/
* Description: Adds VAT at 20% to products on shop and archive pages
* Author: raisonon
* Author URI: http://www.raison.co/
* Version: 1.1
* License: GPLv2 or later
*/
@ejntaylor
ejntaylor / home-blog-grid.php
Created October 12, 2013 09:39
Woo Canvas Blog Grid (based on Magazine Blog Grid)
<style>
/* Home - Blog Grid */
.home-blog-grid article {
float: left;
width: 47%;
padding-right: 3%;
}
@ejntaylor
ejntaylor / php.ini
Last active December 26, 2015 17:09
Template essentials
; Template Essentials - Add to / create php.ini in /wp-admin/
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300
memory_limit = 256M
@ejntaylor
ejntaylor / functions.php
Last active December 26, 2015 18:09
WooCommerce Mods in functions.php
/* dynamic pricing - cumulative addition between order and product deals */
add_filter('woocommerce_dynamic_pricing_is_cumulative', 'custom_dynamic_pricing_cumulative', 10, 4);
function custom_dynamic_pricing_cumulative($default, $module_id, $cart_item, $cart_item_key) {
return true;
}
/**
/* type */
/* ** navigation */
/* move admin bar to bottom */
body.admin-bar {
margin-top: -28px;
padding-bottom: 28px;
@ejntaylor
ejntaylor / functions.php
Last active December 27, 2015 16:19
general functions snippets. - image sizes, - insert page content
// insert page content
// Inserts page content per page. Eg. insert-home.php for Home, insert-functions.php for Functions
add_action('woo_content_before','ro_insert_page');
function ro_insert_page () {
global $post;