Skip to content

Instantly share code, notes, and snippets.

View joecue's full-sized avatar
🎯
Focusing

Joe Querin joecue

🎯
Focusing
View GitHub Profile
@joecue
joecue / calendar.php
Last active November 24, 2023 23:59
PHP Script to Generate a Calendar Grid for the month of the Current date.
<html>
<head>
<link href='https://fonts.googleapis.com/css?family=Lato' rel='stylesheet' type='text/css'>
<style>
body{font-family: Lato;}
caption{font-size: 22pt; margin: 10px 0 20px 0; font-weight: 700;}
table.calendar{width:100%; border:1px solid #000;}
td.day{width: 14%; height: 140px; border: 1px solid #000; vertical-align: top;}
td.day span.day-date{font-size: 14pt; font-weight: 700;}
th.header{background-color: #003972; color: #fff; font-size: 14pt; padding: 5px;}
@joecue
joecue / color-fade.html
Created February 15, 2016 16:07
CSS Color Fading Example
<!DOCTYPE html>
<html>
<head>
<title> Color fade example</title>
<link href='https://fonts.googleapis.com/css?family=Raleway:400,800|Rock+Salt' rel='stylesheet' type='text/css'>
<style>
body{
padding: 0;
margin: 0;
@joecue
joecue / json.html
Last active June 10, 2016 15:11
JSON Example for Retrieving Media Post Data from WP-API
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script>
@joecue
joecue / snippets.php
Last active February 4, 2016 13:11
Useful WordPress Snippets
//Remove Autolinking Comment Hyperlink
remove_filter('comment_text', 'make_clickable', 9);
//Require Minimum Comment Length
add_filter( 'preprocess_comment', 'minimal_comment_length' );
function minimal_comment_length( $commentdata ) {
$minimalCommentLength = 20;
if ( strlen( trim( $commentdata['comment_content'] ) ) < $minimalCommentLength ){
@joecue
joecue / _icons.css
Last active October 1, 2015 17:01
gulp-iconfont Configuration
/* Icon CSS Template - Used by gulp-iconfont plugin to create CSS file to use with fonts */
@font-face {
font-family: "<%= fontName %>";
src: url('<%= fontPath %><%= fontName %>.eot');
src: url('<%= fontPath %><%= fontName %>.eot?#iefix') format('eot'),
url('<%= fontPath %><%= fontName %>.woff') format('woff'),
url('<%= fontPath %><%= fontName %>.ttf') format('truetype'),
url('<%= fontPath %><%= fontName %>.svg#<%= fontName %>') format('svg');
font-weight: normal;
@joecue
joecue / functions.php
Last active November 5, 2015 14:24
Sample WordPress Child Theme functions file
<?php
/* Add Parent Theme Styles */
function demo_scripts() {
wp_enqueue_style( 'demo-framework-style', get_template_directory_uri() .'/style.css' );
/* ----- Add Foundation Support From Parent Theme ----- */
/* Add Foundation CSS */
wp_enqueue_style( 'foundation-normalize', get_template_directory_uri() . '/foundation/css/normalize.css' );
@joecue
joecue / functions.php
Created July 18, 2015 20:28
Sample WordPress Function file showing Foundation Enqueues
/**
* Enqueue scripts and styles.
*/
function demo_wordcamp_scripts() {
wp_enqueue_style( 'demo-wordcamp-style', get_stylesheet_uri() );
/* Add Foundation CSS */
wp_enqueue_style( 'foundation-normalize', get_stylesheet_directory_uri() . '/foundation/css/normalize.css' );
wp_enqueue_style( 'foundation', get_stylesheet_directory_uri() . '/foundation/css/foundation.css' );
@joecue
joecue / Gruntfile.js
Created July 18, 2015 20:27
Sample Grunt File
module.exports = function(grunt) {
SOURCE_DIR = '',
BUILD_DIR = '../../wwwroot-wp_demo_theming/wp-content/themes/demo-theme',
// Configuration Info
grunt.initConfig({
sass: {
@joecue
joecue / footer-add-this-line.php
Last active August 29, 2015 14:25
WordCamp Columbus 2015 - WP 201 - Demo Menu Plugin
@joecue
joecue / announcement-demo.php
Created July 17, 2015 18:40
Announcement Custom Field (Meta Box) and Custom Post Type Example
<?php
/*
Plugin Name: Announcement Demo Plugin
Description: Site specific code changes for example.com
*/
/* Start Adding Functions Below this Line */
// Register Custom Post Type
function custom_post_type() {