Skip to content

Instantly share code, notes, and snippets.

/**
* There's no getting around it:
* post meta in wordpress is insanely difficult
* even with a plugin or a library, wordpress post meta simply sucks to work with
*
*/
add_action( 'add_meta_boxes', 'truckpost_meta' );
<?php
/**
* The template for displaying all pages.
*
* This is the template that displays the front page
*
* @package larkin square
*/
get_header('frontpage'); ?>
<?php
/**
/* This loop gives us back
/*
*/
$args = array(
'post_type' => 'larkin_event'
) ;
$my_query = new WP_Query($args) ;
$(document).ready(function () {
// variables
var questionContainer = $("#questionContainer") ;
var result = $("#result");
var firstChoice = $("#1stChoice");
// Questions Array
@sunilw
sunilw / gist:e7d475be58699e2a0fff
Created June 1, 2014 01:58
grunt confit with browserify and watchify
module.exports = function (grunt){
grunt.initConfig({
compass : {
dist : {
options : {
cssDir : 'css',
sassDir : 'sass',
debugInfo : true
}
jQuery(document).ready(function() {
var mobileNavMenu = $("#mobile-nav-menu");
var mobileNavButton = $(".mobile-nav-button") ;
var uberMenu = $("#ubermenu") ;
(function(){
window.larkinApp = {
jQuery(document).ready(function() {
var mobileNavMenu = $("#mobile-nav-menu");
var mobileNavButton = $(".mobile-nav-button") ;
var uberMenu = $("#ubermenu") ;
(function(){
window.larkinApp = {
<?php
/**
* Plugin Name: UBCF Slideshow
* Description: slideshow for the testimonials page
* Version: 0.9
* Author: Sunil Williams
* Author URI: http://sunil.co.nz
*/
<?php
function get_ID_by_page_name($page_name) {
global $wpdb;
$page_name_id = $wpdb->get_var("SELECT ID FROM $wpdb->posts WHERE post_name = '".$page_name."' AND post_type = 'page'");
return $page_name_id;
}
function custom_excerpt_length( $length ) {
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
/**
* Footer Template
*
* Here we setup all logic and XHTML that is required for the footer section of all screens.
*
* @package WooFramework
* @subpackage Template
*/