Skip to content

Instantly share code, notes, and snippets.

View cdharrison's full-sized avatar
🎯
Focusing

@cdharrison cdharrison

🎯
Focusing
View GitHub Profile
@cdharrison
cdharrison / fooevents.php
Created May 14, 2018 21:50
This adds the ability for FooEvents data to be automatically detected and mapped properly when importing a CSV of Events-as-Products for WooCommerce.
<?php
/**
* Register FooEvents columns in the importer.
* @link: https://github.com/woocommerce/woocommerce/wiki/Product-CSV-Importer-&-Exporter#adding-custom-import-columns-developers
*
* @param array $options
* @return array $options
*/
function add_column_to_importer( $options ) {
@cdharrison
cdharrison / tiled-gallery-snippet.md
Last active February 19, 2016 15:16
I'm using [CMB2](https://github.com/WebDevStudios/CMB2) to enable me to add custom images to a post via a [File field type](https://github.com/WebDevStudios/CMB2/wiki/Field-Types#file). Rather than have a user create a gallery and place it within the body of content, I wanted to control where and how it displayed.
@cdharrison
cdharrison / anker-links.md
Last active August 29, 2015 14:18
Anker Links
@cdharrison
cdharrison / _post-status.scss
Last active August 3, 2019 01:53
WordPress Post Status
.status-draft{
background: #FFFED8;
&:before{
content: 'DRAFT';
background: #7F7E46;
color: #fff;
display: block;
padding: 5px;
text-transform: uppercase;
}
@cdharrison
cdharrison / SassMeister-input.scss
Created January 9, 2014 16:54
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.2)
// Compass (v1.0.0.alpha.17)
// ----
$grey: #777;
$logosize: 31;
$blockpercent: 7%;
// Calculate the proper size of the blocks
Go to Alfred Preferences
Web Search
Add Custom Search
Search URL: http://smile.amazon.com/s/ref=nb_sb_noss_2?url=search-alias%3Daps&field-keywords={query}
Title: Smile
Keyword: smile
URL for sharing: alfred://customsearch/Smile/smile/utf8/noplus/http://smile.amazon.com/s/ref=nb_sb_noss_2?url=search-alias%3Daps&field-keywords={query} (Copy and paste into your browser and it should open Alfred to add this.)
@cdharrison
cdharrison / archives.php
Created November 21, 2013 20:01
A slightly fancier archives page for WordPress
<?php
/**
* @package WordPress
* @subpackage Tersus
Template Name: Archives
*/
?>
@cdharrison
cdharrison / archives.php
Created November 21, 2013 19:58
A page template for a slightly customized archives page for WordPress.
<?php
/**
* @package WordPress
* @subpackage effercio
*/
/*
Template Name: Archives
*/
get_header();
@cdharrison
cdharrison / archive.php
Created November 21, 2013 19:57
Sample archive.php file for WordPress
<?php
/**
* @package WordPress
* @subpackage effercio
*/
get_header();
?>
@cdharrison
cdharrison / css-preprocessors-reading.md
Last active December 25, 2015 18:49
Further Reading on CSS Preprocessors

Further Reading