Skip to content

Instantly share code, notes, and snippets.

Matt Banks mattbanks

Block or report user

Report or block mattbanks

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
mattbanks / taxonomy-query-loop.php
Created Apr 2, 2014
Loop through each taxonomy term, run a new WP_Query in each term
View taxonomy-query-loop.php
// Get terms
// use $args array in second parameter if needed
$my_categories = get_terms( 'TERM_NAME_HERE' );
$my_categories_count = count( $my_categories );
if ( $my_categories_count > 0 && is_array( $my_categories ) ) {
echo '<div class="wrap">';
mattbanks / Gruntfile.js
Last active Jun 13, 2019
Gruntfile.js for use in developing and deploying WordPress themes
View Gruntfile.js
'use strict';
module.exports = function(grunt) {
// load all grunt tasks
// watch for changes and trigger compass, jshint, uglify and livereload
watch: {
mattbanks /
Created Mar 14, 2014
Scaffold a new WordPress development site in Alfred, utilizing WP-CLI. Use this script to run as a Terminal Script. Customize for your theme needs, plugin needs, etc.
# Create directory for new site
cd ~/Sites
mkdir {query}
cd {query}
# Download latest version of WordPress
wp core download
# Setup wp-config file with WP_DEBUG enabled
wp core config --dbname={query} --dbuser=root --dbpass=root --dbprefix={query}wp_ --extra-php <<PHP
mattbanks / gulpfile.js
Created Feb 4, 2014
Setup for using gulp in developing and deploying WordPress themes
View gulpfile.js
// Load plugins
var gulp = require('gulp'),
plugins = require('gulp-load-plugins')({ camelize: true }),
lr = require('tiny-lr'),
server = lr();
// Styles
gulp.task('styles', function() {
return gulp.src('assets/styles/source/*.scss')
.pipe(plugins.rubySass({ style: 'expanded', compass: true }))
mattbanks / package.json
Last active Mar 12, 2018
base package.json for jest and eslint
View package.json
"name": "project-name",
"description": "project description",
"author": "Matt Banks <>",
"version": "1.0.0",
"repository": {
"type": "git",
"url": "project-url-here"
"scripts": {
mattbanks / .editorconfig
Created Mar 12, 2018
base editorconfig
View .editorconfig
# EditorConfig coding styles definitions. For more information about the
# properties used in this file, please see the EditorConfig documentation:
# indicate this is the root of the project
root = true
charset = utf-8
end_of_line = lf
View jest.config.js
module.exports = {
// collectCoverage: true,
// collectCoverageFrom: [
// 'app/**/*.js'
// ],
testResultsProcessor: 'jest-junit',
View .eslintrc
"extends": [
"parserOptions": {
"ecmaVersion": 8,
"ecmaFeatures": {
"classes": true
mattbanks / Contract Killer
Created Mar 7, 2016 — forked from malarkey/Contract Killer
The latest version of my ‘killer contract’ for web designers and developers
View Contract Killer

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: October 8th 2015
  • Original post

View .hyper.js
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See for all currently supported options.
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 14,
// font family with optional fallbacks
You can’t perform that action at this time.