Skip to content

Instantly share code, notes, and snippets.

View leoken's full-sized avatar

Erik James Albaugh leoken

  • Maintain Web
  • Long Beach, CA
  • X @leoken
View GitHub Profile
@leoken
leoken / wp-users-menu
Created September 16, 2011 21:34
WP Different Menus for Logged In or Logged Out Users
<?php
if ( is_user_logged_in() ) {
wp_nav_menu( array( 'theme_location' => 'logged-in-menu' ) );
} else {
wp_nav_menu( array( 'theme_location' => 'logged-out-menu' ) );
}
?>
@leoken
leoken / gist:2049576
Created March 16, 2012 10:54 — forked from luetkemj/wp-query-ref.php
WordPress WP Query $args
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php
*/
$args = array(
@retlehs
retlehs / gist:2703644
Created May 15, 2012 17:44
Add a class to widgets in a specific sidebar
<?php
/**
* Add 'class="span4"' to all widgets in the Content Bottom sidebar
*/
function bb_content_bottom_widget_class($params) {
if ($params[0]['id'] == 'roots-content-bottom') {
$class = 'class="span4 ';
$params[0]['before_widget'] = preg_replace('/class=\"/', "$class", $params[0]['before_widget'], 1);
}
@leoken
leoken / index.html
Created July 28, 2012 20:39
A web page created at CodePen.io.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Mechanical Grass &middot; CodePen</title>
<!--
Copyright (c) 2012 Erik James Albaugh, http://codepen.io/leoken
Permission is hereby granted, free of charge, to any person obtaining
@leoken
leoken / index.html
Created September 11, 2012 22:46
Draw Worm
<canvas id='canvas'></canvas>
<!--
Click to clear the canvas
-->
@leoken
leoken / StripeTutorialPage.html
Created September 22, 2012 04:33 — forked from boucher/StripeTutorialPage.html
Stripe Tutorial Payment Form
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>Stripe Getting Started Form</title>
<script type="text/javascript" src="https://js.stripe.com/v1/"></script>
<!-- jQuery is used only for this example; it isn't required to use Stripe -->
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript">
// this identifies your website in the createToken call below
@leoken
leoken / index.html
Created October 5, 2012 08:32
A pure CSS3 fancy text banner using transforms, pseudo-elements, last-child, and more!
<div class="banner">
<div class="line">
<span>Fancy Banners</span>
</div>
<div class="line">
<span>Make It Look</span>
</div>
<div class="line">
<span>Nice &amp; Classy</span>
</div>
@leoken
leoken / alerts.less
Created October 14, 2012 23:42
Bootstrap v2.1.1 + Gravity Forms
//
// Alerts
// --------------------------------------------------
// Base styles
// -------------------------
.alert,
.validation_error,
@leoken
leoken / wordpress-htaccess-rackspace-sites
Created December 1, 2012 04:33 — forked from rachelbaker/wordpress-htaccess-rackspace-sites
Rackspace Cloud .htaccess file fixes for WordPress
# PHP Site Settings for Rackspace Cloud Sites
php_value max_execution_time 3600
php_value upload_max_filesize 100M
php_value post_max_size 220M
php_value memory_limit 256M
# End PHP Site Settings
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
@leoken
leoken / css-ribbon-triangles.html
Created December 8, 2012 07:27
A CodePen by Erik James Albaugh. CSS Ribbon Triangles - Top, bottom, left, and right triangles for a ribbon-like effect using only CSS.
<div class="container">
<h1 class="bltri"><span>⬋</span> Bottom Left Ribbon Triangle</h1>
<h1 class="brtri"><span>⬊</span> Bottom Right Ribbon Triangle</h1>
<h1 class="tltri"><span>⬉</span> Top Left Ribbon Triangle</h1>
<h1 class="trtri"><span>⬈</span> Top Right Ribbon Triangle</h1>
</div>