Skip to content

Instantly share code, notes, and snippets.

View AndrewSepic's full-sized avatar

Andrew AndrewSepic

  • Mapbox
  • Earth, for now
View GitHub Profile
@About2git
About2git / archive-books.php
Last active November 17, 2020 18:12 — forked from srikat/archive-books.php
Single and Archive templates for Custom Post Type in Genesis
<?php
//* Remove breadcrumbs
remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' );
//* Force full width content
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
//* Remove entry meta in entry header
remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );
@patrickgilmour
patrickgilmour / woocommerce-simple-or-variable.php
Created June 27, 2014 17:57
WooCommerce conditional to test if a Product is Simple or Variable.
<?php
/**
* Is a WooCommerce Product Simple or Variable
*
* see http://wordpress.org/support/topic/condition-to-check-if-product-is-simple-or-variable
*/
if( $product->is_type( 'simple' ) ){
// a simple product
@djp424
djp424 / wp-config-mutisite-debug.php
Created October 20, 2014 14:20
How to turn WordPress Debug on for a single site in a MultiSite Install. From https://wordpress.org/support/topic/debugging-multisite-blogs put this in wp-config.php
if ($_SERVER['HTTP_HOST']=='site1.example.com')
define('WP_DEBUG', true);
else
define('WP_DEBUG', false);
@woogists
woogists / wc-min-order-amount.php
Last active November 18, 2022 22:30
Set a minimum order amount for checkout
/**
* Set a minimum order amount for checkout
*/
add_action( 'woocommerce_checkout_process', 'wc_minimum_order_amount' );
add_action( 'woocommerce_before_cart' , 'wc_minimum_order_amount' );
function wc_minimum_order_amount() {
// Set this variable to specify a minimum order value
$minimum = 50;
@krambertech
krambertech / Component.jsx
Created July 2, 2016 10:44
ReactJS: Input fire onChange when user stopped typing (or pressed Enter key)
import React, { Component } from 'react';
import TextField from 'components/base/TextField';
const WAIT_INTERVAL = 1000;
const ENTER_KEY = 13;
export default class TextSearch extends Component {
constructor(props) {
super();