Skip to content

Instantly share code, notes, and snippets.

<?php
/**
* Function: Average
* Calculates average of values taken from custom fields out of a WordPress loop. Built of Jason ;)
* Author: Baki Goxhaj
*/
function average( $post_no );
$no = 0;
$query = new WP_Query('posts_per_page=' . $post_no ); while( $query->have_posts() ) : $query->the_posts();
.gist {
color: #000;
}
.gist div {
padding: 0;
margin: 0;
}
.gist .gist-file {
@daneden
daneden / dabblet.css
Created January 5, 2012 15:28
Mac OS X Lion avatar in CSS
/* Mac OS X Lion avatar in CSS */
body {
background: #67676a;
padding: 100px;
}
.avatar {
display: block;
position: relative;
width: 128px;