Skip to content

Instantly share code, notes, and snippets.

View sc0ttkclark's full-sized avatar
🍕
Working hard reviewing and deploying code

Scott Kingsley Clark sc0ttkclark

🍕
Working hard reviewing and deploying code
View GitHub Profile
<?php
//**Most Commented On Posts Loop same as before**/
$args = array(
'date_query' => array(
//set date ranges with strings!
'after' => '1 week ago',
'before' => 'today',
//allow exact matches to be returned
'inclusive' => true,
),
<?php
/**
* @package Pods
*/
class PodsAPI {
/**
* @var PodsAPI
*/
static $instance = null;
var custom_zip_search = '<div class="zip-search">'
+ '<label class="alignleft">Enter Zip:<span class="help alignright"></span></label>'
+ '<input type="text" name="zip_code_ZIPID" />'
+ '<div class="add-zip alignleft"><span class="green-arrow"></span> <span class="available">Available</span> For You To Represent.'
+ '<p><a href="#" class="add-another">Add another zip code for $100 annually</a></p>'
+ '</div></div>';
$( '.checkout-2 .gfield_checkbox li' ).each( function() {
var $this = $( this ),
$checkbox = $( 'input[type="checkbox"]', $this ),
<?php
function enhanceins_zip_code_check( $result, $value, $form, $field ) {
global $wpdb;
if ( !$result[ 'is_valid' ] ) {
return $result;
}
if ( !is_array( $value ) ) {
$value = explode( ',', $value );

Use Case

We’re building a site for Golf Courses in a state. We need:

  1. Properties
  • taxonomies: Type (private/public), State, County
  1. Courses
    • taxonomies: bunkers (light, medium, heavy), features (sand trap, putting practice), rate tier ($, $$, $$$), Course Rating (*, **, ***)
  2. Holes
    • Holes have tees (black tee, white tee) each with different par/handicap/yards