Skip to content

Instantly share code, notes, and snippets.

@taeo
taeo / delete_bad_usermeta.sql
Created February 22, 2019 00:38
WooCommerce - delete users with customer role and no orders (likely spam accounts)
/* Delete usermeta that nas no related user in users */
DELETE FROM wp_usermeta WHERE wp_usermeta.user_id NOT IN (SELECT ID FROM wp_users);
@taeo
taeo / gravityforms-star-ratings.html
Last active November 8, 2022 15:18
Quick hack / jQuery plugin to enable visual star ratings from Gravity Forms radio fields.
<!--
GRAVIY FORMS NOTES:
1. Create a “radio” group on any form
2. In the “appearance" tab, give the custom css class `js-gf-rating-stars`
3. The radio values should be in order from low -> high (1,2,3,4,5,etc…).
4. You can have as many stars as you want, it’s based off the number of radio elements in the group.
5. You could technically have as many groups of ratings stars as you want.
JS CONFIG:
@taeo
taeo / accordion.js
Created January 9, 2015 18:13
Responsive, Conditional Accordion Content
/*
* Dead Simple, Responsive opt-in accordions
*
* Requires:
* - enquire.js
* - jquery-inviewport.js
* - unveil.js
*
*/
(function($) {
@taeo
taeo / wp-helpers.php
Created December 3, 2014 00:33
Wordpress general helpers
<?php
/**
Utility funcitons for passing (ahum) "variables" between wp templates
**/
$sg_univeral_vars = array();
/**
* Add key values that can be retrived w/in other wp templates.
@taeo
taeo / wp-redux-helper.php
Created December 3, 2014 00:31
Wordpress Redux Helper
<?php
/**
* NOTE:
* This requires setting your redux global var to $sg_redux
**/
/* Echo value from sole redux config */
function the_redux_setting($key, $index=null) {
echo get_redux_setting($key, $index);
}
@taeo
taeo / bayinkjet-pw.css
Created September 19, 2014 01:07
BIJ PW Howto
/* Remove the negative -5px margin on the div containing the button */
iframe[src^="https://widget.pricewaiter.com/nyp/button.php"] {
width: 158px !important; /* Whatever width you'd like */
}
@taeo
taeo / teampage.css
Last active August 29, 2015 14:04
SF Test
body, html, * {
background: blue !important;
}
.team-box p {
text-transform: uppercase;
text-align: center;
font-weight:400;
font-size: 12px;
margin-top: 135px;
}
@taeo
taeo / gist:6236411
Created August 14, 2013 22:41
Boiler Plate HTML - copy and paste guide for element styling
<h1>Primary Headline (h1)</h1>
<p class="lead">I'm a lead paragraph. Lorem ipsum dolor sit amet, consectetur adipiscing elit. In nibh neque, rhoncus vel pretium at, ornare ac metus. Nullam in aliquam metus. Nulla non arcu dignissim urna convallis semper rhoncus at felis. Suspendisse nec quam sem. Etiam scelerisque tristique tellus, ac auctor velit hendrerit commodo.</p>
<p>I'm a standard paragraph with <a href="#">default link style</a>. Lorem ipsum dolor sit amet, consectetur adipiscing elit. In nibh neque, rhoncus vel pretium at, ornare ac metus. Nullam in aliquam metus. Nulla non arcu dignissim urna convallis semper rhoncus at felis. Suspendisse nec quam sem. Etiam scelerisque tristique tellus, ac auctor velit hendrerit commodo.</p>
<h2>Headline 2 <small>w/ divider below</small></h2>
<div class="divider"></div>
<div class="row-fluid">
@taeo
taeo / fluid_fixed.html
Created November 9, 2012 18:46
Layouts: Fluid > Fixed
<!doctype html>
<html>
<head>
<title>Layouts: Fluid &gt; Fixed</title>
<style type="text/css">
html {
margin: 0;
padding: 0;
}
body {