Skip to content

Instantly share code, notes, and snippets.

View kalenjohnson's full-sized avatar

Kalen Johnson kalenjohnson

View GitHub Profile
jQuery(document).ready(function($) {
$(window).on('load resize orientationchange',aspectRatioRespond);
aspectRatioRespond();
});
function aspectRatioRespond(){
mobileMax = 480;
elements = jQuery('[data-ratio]');
elements.each(function(){
container = jQuery(this);
@kalenjohnson
kalenjohnson / gist:9fb75f48342d8537899a
Created June 27, 2014 17:27
Walker Nav with Drawer
<?php
/**
* Cleaner walker for wp_nav_menu()
*
* Walker_Nav_Menu (WordPress default) example output:
* <li id="menu-item-8" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-8"><a href="/">Home</a></li>
* <li id="menu-item-9" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-9"><a href="/sample-page/">Sample Page</a></l
*
* Roots_Nav_Walker example output:
* <li class="menu-home"><a href="/">Home</a></li>
svn: E195023: Commit failed (details follow):
svn: E195023: Changing directory '/media/Stuff/Work/Wordpress/wordpress-php-error-page/trunk/img' is forbidden by the server
svn: E175013: Access to '/!svn/txr/925808-kiub/php-error-page/trunk/img' forbidden
@kalenjohnson
kalenjohnson / wp_all_posts_in_category
Created December 6, 2013 22:30
Wordpress Show all posts in each category
<?php
$category_IDs = get_all_category_ids();
// Loop through categories
foreach ( $category_IDs as $category_ID ) :
$query = new WP_Query( array(
'cat' => $category_ID,
'posts_per_page' => - 1,
) );
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no