Skip to content

Instantly share code, notes, and snippets.

View zoerooney's full-sized avatar

Zoe Rooney zoerooney

View GitHub Profile
@zoerooney
zoerooney / dabblet.css
Created March 17, 2013 16:47
Flamingo Sample
/**
* Flamingo Sample
*/
body {
font-family: sans-serif;
font-size: 14px;
padding: 50px
}
@zoerooney
zoerooney / dabblet.css
Created March 17, 2013 16:48 — forked from anonymous/dabblet.css
About HTML & CSS
/*
* About HTML & CSS
*/
/*
body {
font-family: Arial, sans-serif;
font-size: 14px;
padding: 50px
@zoerooney
zoerooney / dabblet.css
Created March 17, 2013 18:07
Flamingo Sample
/**
* Flamingo Sample
*/
body {
font-family: sans-serif;
font-size: 14px;
padding: 50px;
background: #333;
}
@zoerooney
zoerooney / dabblet.css
Created March 17, 2013 18:10
Flamingo Sample
/**
* Flamingo Sample
*/
body {
font-family: sans-serif;
font-size: 14px;
padding: 50px;
background: #333;
}
@zoerooney
zoerooney / gist:5246765
Last active December 15, 2015 10:39 — forked from anonymous/gist:5232727
<?php
/**
* Template Name: Portfolio
* Created by Zoe Rooney http://zoerooney.com
*/
get_header(); ?>
<div id="primary" class="full-width">
<div id="content" role="main">
<?php if ( has_post_format( 'gallery' )) { ?>
<div class="controls"></div>
<div class="slideshow"></div>
<div class="captionbox"></div>
<div class="thumb-wrapper">
<?php $images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'post_status' => null, 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => -1 ) );
if( $images ): ?>
<ul class="thumbs noscript">
<?php foreach( $images as $attachment_id => $attachment ): ?>
<li>
@zoerooney
zoerooney / jquery-hash-filtering.js
Last active December 17, 2015 10:59
A few different ways to use URL information in WordPress themes, from a mini-tutorial here: http://zoerooney.com/blog/tutorials/using-the-referring-page-in-wordpress/
jQuery(document).ready(function($){
// Read URL and determine if it contains "free"
if(window.location.href.indexOf("free") > -1 ) {
// If it does, filter the list
$.filtrify("patterns-list", "filter", {
close : true, // let's not have any drop downs open
query : {
"cost" : ["free"] // pre-set the filter to only show free patterns
},
@zoerooney
zoerooney / functions.php
Last active December 17, 2015 11:09
UnoSlider (http://unoslider.npmedia.net/) + WordPress Slider Tutorial Code [Tutorial Coming Soon]
<?php
/**
* ENQUEUE SCRIPTS
*/
function add_new_scripts_method() {
if ( is_page_template('page-with-slider.php') ) :
wp_enqueue_script(
'unoslider',
get_template_directory_uri() . '/js/unoSlider-1.0.1.min.js',
array('jquery')
<?php
// create a variable, use it to get the lead time digit from an ACF custom field
$lead_time = get_field('lead_time');
// then display the date relative to that lead time
echo date('F Y', strtotime('+'.$lead_time.' weeks'));
?>
@zoerooney
zoerooney / sidebar-dropdown-function.php
Last active December 17, 2015 15:29
Code snippets for a tutorial on drop down sidebar widgets & content blocks in WordPress. See also: https://gist.github.com/zoerooney/5632470 Tutorial link to come.
<?php
register_sidebar( array(
'name' => 'sidebar',
'id' => 'sidebar-1',
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
) );
?>