Skip to content

Instantly share code, notes, and snippets.

View flexseth's full-sized avatar

Seth Miller flexseth

View GitHub Profile
@flexseth
flexseth / gw-gravity-forms-horizontal-forms.css
Last active June 4, 2019 19:04 — forked from spivurno/gw-gravity-forms-horizontal-forms.css
Gravity Wiz // Gravity Forms // Horizontal Form Helper Styles
/*
* Details for adding the CSS classes listed here
* https://gravitywiz.com/build-horizontal-forms-gravity-forms/
*/
.gf_simple_horizontal_wrapper.gf_browser_chrome ul.gform_fields li.gfield span.name_first,
.gf_simple_horizontal_wrapper.gf_browser_chrome ul.gform_fields li.gfield span.name_middle,
.gf_simple_horizontal_wrapper.gf_browser_chrome ul.gform_fields li.gfield span.name_last {
padding-top: 0 !important;
}
@flexseth
flexseth / functions.php
Last active July 15, 2019 18:32 — forked from About2git/functions.php
Shrinking header in Genesis similar to that in Centric Pro
//* Enqueue Scripts
add_action( 'wp_enqueue_scripts', 'custom_load_scripts' );
function custom_load_scripts() {
wp_enqueue_script( 'shrinking-header', get_bloginfo( 'stylesheet_directory' ) . '/js/shrinking-header.js', array( 'jquery' ), '1.0.0', true );
}
@flexseth
flexseth / zipcode-2.php
Created May 9, 2019 17:33 — forked from hiranthi/zipcode-2.php
Zipcode validation for Gravity Forms (5 digits, 2 approaches).
<?php
# just add the needed form IDs to the array
$forms = array( '6', '7' );
# looping through the array to add an 'add_filter' for each
foreach ( $forms as $i => $form )
add_filter( "gform_field_validation_{$form}", 'custom_zip_validation', 10, 4 );
# the function
@flexseth
flexseth / gist:ff1f9881c2d069c2f9cc
Created March 26, 2016 21:12 — forked from brendannee/gist:7196251
Whitelist a Wordpress custom post type for use with the Jetpack JSON API using the `rest_api_allowed_post_types` filter.See http://developer.wordpress.com/docs/api/1/get/sites/%24site/posts/
function fp_allow_my_post_types($allowed_post_types) {
$allowed_post_types[] = 'tribe_events';
return $allowed_post_types;
}
add_filter( 'rest_api_allowed_post_types', 'fp_allow_my_post_types');
@flexseth
flexseth / Pinterest Gadget for Blogger
Last active August 29, 2015 14:09 — forked from mariemosley/Pinterest Gadget for Blogger
Starting point for Pinterest Widget for WordPress
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
/**
* Plugin: jquery.zRSSFeed
*
* Version: 1.0.1
* (c) Copyright 2010, Zazar Ltd
*
* Description: jQuery plugin for display of RSS feeds via Google Feed API
* (Based on original plugin jGFeed by jQuery HowTo)
@flexseth
flexseth / 0_reuse_code.js
Last active August 29, 2015 14:06
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