Skip to content

Instantly share code, notes, and snippets.

Just moving and grooving

Josh Larson jplhomer

Just moving and grooving
Block or report user

Report or block jplhomer

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
jplhomer / functions.php
Created Mar 19, 2017
Set a custom taxonomy for Taghound Media Tagger
View functions.php
// Your theme's functions.php file...
function custom_tag_taxonomy( $slug ) {
add_filter( 'tmt_tag_taxonomy', 'custom_tag_taxonomy', 10, 1 );
jplhomer / app.scss
Last active Feb 13, 2017
Using Laravel Mix for a standalone project
View app.scss
$favorite-color: green;
$pad: 1em;
#app {
background-color: $favorite-color;
h1 {
font-size: $pad * 5;
jplhomer / taghound-frontend.php
Created Feb 13, 2017
Show Taghound Tags on the front-end of a WordPress post.
View taghound-frontend.php
// single.php or whatever template you'd like
// 1. Get the ID of the current thumbnail for the post
$attachment_id = get_post_thumbnail_id();
// 2. Get the tags associated to the image
$tags = wp_get_post_terms($attachment_id, 'tmt_tag');

Keybase proof

I hereby claim:

  • I am jplhomer on github.
  • I am jplhomer ( on keybase.
  • I have a public key ASC2sjVUdy9XeT2gcSjdtIkjHwyAYYqKI7YTfCDALshl7Ao

To claim this, I am signing this object:

jplhomer / basic.html
Last active Dec 20, 2017
Example of loading fonts with loadCSS
View basic.html
<!-- Our font file is fonts.css -->
loadCSS: load a CSS file asynchronously.
[c]2014 @scottjehl, Filament Group, Inc.
Licensed MIT
/* exported loadCSS */
jplhomer /
Created Feb 25, 2015
Disable all comments/pings in WordPress with WP-CLI
$ wp post list --format=ids | xargs wp post update --comment_status=closed
# Output:
# Success: Updated post 2514.
# Success: Updated post 2511.
# Success: Updated post 2504.
# Success: Updated post 2499.
# Success: Updated post 2441.
# etc...
jplhomer / 0_reuse_code.js
Last active Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
jplhomer / routes.js
Created May 22, 2014
How do I use promises in NodeJS?
View routes.js
* This is a NodeJS app using the official MailChimp API wrapper.
* I want to grab this data and display it in a custom view, but without a giant callback-y mess. Ideas?
exports.view = function(req, res){
mc.campaigns.list({campaign_id:}, function(campaignData) {
var campaign =[0];
mc.reports.summary({}, function(reportData) {
mc.lists.list({ list_id: campaignData.list_id }, function(listData) {
jplhomer / page-about.php
Created Oct 25, 2013
The template to show our custom timeline using Wordpress and Advanced Custom Fields:
View page-about.php
<?php if ( $events = get_field( 'events' ) ) :
// Re-order our events just in case
if ( get_field('sort_order') == 'Date Descending') {
usort( $events, 'sort_by_date_descending');
} else {
usort( $events, 'sort_by_date_ascending');
// Set a year checker to see if we should print a new year
$year = 0;
jplhomer / pageslide.min.js
Created Sep 9, 2013
A small fork of srobbin's jquery-pageslide ( to enable the touch event in the main container, enabling the menu to be toggled by an off-menu touch on mobile.
View pageslide.min.js
* jQuery pageSlide
* Version 2.0
* EDITED BY @jplhomer to enable the toggling of the menu by touching the main content area.
* jQuery Javascript plugin which slides a webpage over to reveal an additional interaction pane.
* Copyright (c) 2011 Scott Robbin (
* Dual licensed under the MIT and GPL licenses.
You can’t perform that action at this time.