Skip to content

Instantly share code, notes, and snippets.

View mattonomics's full-sized avatar

Matt Gross mattonomics

  • Bonsai.io (OMC)
  • Lexington, KY
View GitHub Profile
@mattonomics
mattonomics / custom.css
Created February 28, 2012 23:21
Thesis Skin Starter Template - Basic
/*---:[ body ]:---*/
body.custom { background: #000; }
@mattonomics
mattonomics / custom.css
Created February 29, 2012 16:59
Thesis Skin Starter Template - Advanced
/*---:[ body ]:---*/
body { background: #000; }
/*---:[ menu ]:---*/
.menu { list-style: none; }
.menu li { float: left; }
.menu li a { text-decoration: none; display: block; }
/*---:[ post image fix from @kristarella ]:---*/
.post_image { max-width: 100%; height: auto; }
@mattonomics
mattonomics / functions.php
Created March 1, 2012 15:25
Thesis Child Theme - Basic
<?php
// Iinitial sanity check
if (! defined('ABSPATH'))
die('Please do not directly access this file');
// Bring in the main functions file so we have access to all the yummy Thesis goodness
include_once(TEMPLATEPATH . '/functions.php');
// we encourage you to set up a class. classes are a VERY important part of 2.0, so you need to be familiar with them.
@mattonomics
mattonomics / functions.php
Created March 1, 2012 15:58
Thesis Child Theme - Advanced
<?php
if (! defined('ABSPATH'))
die('Please do not directly access this file');
include_once(TEMPLATEPATH . '/functions.php');
class thesis_child_theme_example extends thesis_custom_loop {
public function __construct() {
@mattonomics
mattonomics / dummy.php
Created March 6, 2012 23:51
Dummy Test
<?php
/*
Count from 1-100. If the number is divisible by 3 & 5, output "FizzBuzz".
If divisible by 3 but not 5, output "Fizz".
If divisible by 5 but not 3, output "Buzz".
Otherwise output the number.
*/
function loop_it() {
$out = '';
@mattonomics
mattonomics / gist:2481989
Created April 24, 2012 17:51
Get Thesis Header URL
<?php
// use thesis_header_url() to echo the URL and thesis_header_url(false) to simply return it
function thesis_get_header_url($echo = true) {
if (! $option = get_option('thesis_header') || ! is_array($option) || ! isset($option['url']) || empty($option['url']))
return;
if ($echo)
echo esc_url($option['url']);
else
@mattonomics
mattonomics / skin-with-cpt.php
Created May 12, 2012 20:57
Thesis Skin with Custom Post Types
<?php
if (! defined('ABSPATH'))
die('Please do not directly access this file');
// classes are a VERY important part of 2.0, so you need to be familiar with them.
if (! defined('ABSPATH'))
die('Please do not directly access this file');
class thesis_skin_example extends thesis_custom_loop {
@mattonomics
mattonomics / thesis-multimedia-box.php
Created August 10, 2012 20:11
Thesis Multimedia Box
<?php
add_filter('thesis_show_multimedia_box', '__return_false');
add_action('thesis_hook_before_content', 'thesis_multimedia_box');
?>
@mattonomics
mattonomics / gist:3834218
Created October 4, 2012 15:08
Reset all the things
<?php
// drop this in your custom.php file. run it ONCE or it will continue to reset everything.
// for now, this only works for Thesis Classic
include_once(dirname(__FILE__) . '/seed.php');
$options = array(
'boxes', 'templates', 'packages', 'snippets', 'vars', 'css', 'custom_css'
);
@mattonomics
mattonomics / gist:3834940
Created October 4, 2012 16:58
MOST basic skin ever
<?php
/*
Name: The Name of Your Skin
Author: Your Name
Description: A succinct description of what you're doing in this skin, special features, etc.
Version: 1.0
Class: unique_class_name
*/