Skip to content

Instantly share code, notes, and snippets.

View flexseth's full-sized avatar

Seth Miller flexseth

View GitHub Profile
@flexseth
flexseth / wp-live-view
Last active January 1, 2016 15:19
Concatenate scripts - this can be useful when doing a project in local development and the live view in Dreamweaver is not working correctly. This tells Dreamweaver to load the files needed to render a page so that you can look at it in live view, use the CSS Designer on it, and more. Must be running MAMP, LAMP or another Apache file server and …
/** For local development only **/
define('CONCATENATE_SCRIPTS', false);
@flexseth
flexseth / call-jquery-in-genesis.js
Last active August 29, 2015 14:01
Correctly make jQuery calls in Genesis based WordPress
jQuery(document).ready(function($){
// do something
});
@flexseth
flexseth / which-gun
Last active August 29, 2015 14:05
Logic for figuring out what gun we're looking at
// figure out which model this is
$model = $rifle->get_title();
$is_birthday = preg_match("/50/", $model) == 1 || preg_match("/60/", $model) == 1;
$is_occasion_big_boy = preg_match('/occasion/', $model) == 1 && preg_match('/big/', $model) == 1;
$is_occasion_golden_boy = preg_match('/occasion/', $model) == 1 && preg_match('/golden/', $model) == 1;
$is_personal_serial = preg_match('/serial/', $model) == 1;
@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
@flexseth
flexseth / genesis-sample-column-classes-template-v-1.9
Last active August 29, 2015 14:09
CSS to create Genesis Column Classes with the sample team - Template v. 1.9
/****** STYLESHEET HEADER *****/
/* Not needed, only for clarification that you are using the correct theme */
/*
Theme Name: Genesis Sample
Description: This is the sample theme created for the Genesis Framework.
Author: StudioPress
Author URI: http://www.studiopress.com/
@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 / plugins-custom.css
Last active August 29, 2015 14:10
WordPress Plugin Style Overrides
/** My custom plugin CSS
*
* This file should be in plugins/myplugins, additionally
* you should include the add-to-functions.php code to your
* functions.php file to initialize this stylesheet after
* your plugin styles are set, making it easier to
* edit plugin styles.
**/
/** Your custom plugin style overrides below... **/
@flexseth
flexseth / equal-heights
Created December 16, 2014 22:06
Equal Height Columns example
<?php
/* Equal height columns for various pages */
/*
add_action( 'genesis_after', 'fp_equal_height' );
function fp_equal_height() {
?>
<script>
equalheight = function(container){
var currentTallest = 0,
@flexseth
flexseth / force-edge-rendering
Created December 20, 2014 15:44
Force Edge Rendering in Chrome & IE on the Genesis Framework
// Force IE & Chrome to display content with the most up to date rendering engine
add_action( 'genesis_meta', 'fp_force_edge_rendering' );
function fp_force_edge_rendering() {
echo '<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />';
}
@flexseth
flexseth / home
Last active August 13, 2016 16:04
Home page parallax in Genesis Sample child theme (parallax header)
/**
* This file adds the Home Page to the Parallax Pro Theme.
*
* @author Brad Dalton
* @package Parallax
* @subpackage Customizations
*/
add_action( 'genesis_meta', 'parallax_home_genesis_meta' );
/**