Skip to content

Instantly share code, notes, and snippets.

@corradomatt
corradomatt / roots-pagination.php
Created November 27, 2013 21:46
Advanced Pagination WordPress Roots Theme
<?php
if ( !function_exists('your_pagination')) :
function your_pagination($custom_query) {
if ( !$current_page = get_query_var( 'paged' ) ) $current_page = 1;
$permalinks = get_option( 'permalink_structure' );
if( is_front_page() ) {
$format = empty( $permalinks ) ? '?paged=%#%' : 'page/%#%/';
} else {
@colewinans
colewinans / gist:7914695
Created December 11, 2013 17:24
WooCommerce – Tax Exempt
/**
* Add tax exempt fields to checkout
**/
add_action('woocommerce_before_order_notes', 'taxexempt_before_order_notes');
function taxexempt_before_order_notes( $checkout ) {
woocommerce_form_field( 'tax_exempt_checkbox', array(
'type' => 'checkbox',
'class' => array('tiri taxexempt'),array( 'form-row-wide', 'address-field' ),