Skip to content

Instantly share code, notes, and snippets.

View richardegil's full-sized avatar

Richard Gil richardegil

View GitHub Profile
@richardegil
richardegil / gist:4208087
Created December 4, 2012 20:01
Alpha names
// part 1
<?php
// needed to access data from cpt-onomies
global $cpt_onomy;
// grabs the current taxonomy data being used by this page.
$current_taxonomy = $wp_query->queried_object;
@richardegil
richardegil / gist:4216439
Created December 5, 2012 15:16
my array
Array
(
[0] => Array
(
[myid] => 31
[fname] => Dwayne
[mi] =>
[lname] => Alexander
[degrees] => PHD
)
@richardegil
richardegil / gist:4542144
Created January 15, 2013 21:17
for carlos
.row-fluid .container .row{
margin-left: 0;
}
<!--[if lt IE 9]>
<script src="http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js"></script>
<![endif]-->
//sets definittions for base folder
define( 'TEMPLATE_URI', get_template_directory() );
define( 'TEMPLATE_INCLUDES', get_template_directory(). '/includes' );
//sets definititions for current theme folder
define( 'HOME_URI', home_url() );
define( 'THEME_URI', get_stylesheet_directory() );
define( 'THEME_INCLUDE', THEME_URI . '/includes' );
define( 'THEME_IMAGES', THEME_URI . '/images' );
define( 'THEME_CSS', THEME_URI . '/css' );
@richardegil
richardegil / gist:4686301
Created January 31, 2013 20:49
htaccess
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
@richardegil
richardegil / gist:4687274
Created January 31, 2013 22:33
for chad
/* Display Background URLs */
function sidebar_feature( $post ) {
// Use nonce for verification
wp_nonce_field( plugin_basename( __FILE__ ), 'myplugin_noncename' );
$sidebar_feature = get_post_meta($post->ID, 'sidebar_feature', true);
?>
// search text
$key = wp_specialchars($s, 1);
if ( have_posts() ) :
<p>The following pages contain your search term, <strong>"<?php echo $key;?>"</strong>.</p>
// date comparison
// if date value is greater than yesterday's value
if( strtotime($date) > time()-86400 ){
//do stuff
}
// Ben Folds Five Poster - Cityscape Generator by Brendan Dawes
// http://brendandawes.com/projects/benfoldsfive/
// Requires library from http://toxiclibs.org
import toxi.color.*;
import toxi.util.datatypes.*;
import processing.pdf.*;
final color BACKGROUND_COLOR = color(240);
BASE:
<?php
include (get_template_directory() . '/includes/universal/utms-superinclude-topnav.php');
?>