Skip to content

Instantly share code, notes, and snippets.

@billerickson
billerickson / functions.php
Last active September 24, 2016 23:36
Hide Editor on Specific Template Page
<?php
/**
* Hide Editor
* @author Bill Erickson
* @link http://www.billerickson.net/code/hide-editor-on-specific-page-template/
*/
function be_hide_editor() {
// Get the Post ID
@billerickson
billerickson / gist:1325242
Created October 29, 2011 23:36
Register Sidebars
<?php
/**
* Register Sidebars
* @link http://www.billerickson.net/wordpress-additional-sidebars/
* @author Bill Erickson
*
*/
function be_register_sidebars() {
register_sidebar(
@billerickson
billerickson / gist:1325258
Created October 29, 2011 23:48
Custom Body Classes - Thesis
<?php
/**
* Custom Body Classes - for Thesis
* @link http://www.billerickson.net/wordpress-class-body-tag/
* @author Bill Erickson
*
* @param array $classes existing body classes
* @return array modified body classes
*/
@billerickson
billerickson / gist:1325264
Created October 29, 2011 23:50
Custom Body Classes
<?php
/**
* Custom Body Classes
* @link http://www.billerickson.net/wordpress-class-body-tag/
* @author Bill Erickson
*
* @param array $classes existing body classes
* @return array modified body classes
*/
@billerickson
billerickson / gist:1325276
Created October 30, 2011 00:09
Don't show Events category on homepage
<?php
/**
* Don't show Events category on homepage
* Category 5 = Events category, so we use cat=-5
*
* @link http://www.billerickson.net/thesis-wordpress-remove-category-homepage/
* @author Bill Erickson
* @param object $query
*/
@billerickson
billerickson / gist:1325289
Created October 30, 2011 00:18
Avatar on Features and Single Posts
<?php
/**
* Avatar on Features and Single Posts
*
* @link http://www.billerickson.net/using-gravatars-in-wordpress/
* @author Bill Erickson
*
*/
function custom_author_post_avatar(){
@billerickson
billerickson / gist:1325292
Created October 30, 2011 00:21
Avatar on Teasers
<?php
/**
* Avatar on Teasers
*
* @link http://www.billerickson.net/using-gravatars-in-wordpress/
* @author Bill Erickson
*
*/
function custom_author_post_avatar_teaser(){
@billerickson
billerickson / gist:1325297
Created October 30, 2011 00:27
Set Default Avatar
<?php
/**
* Set Default Avatar
*
* @link http://www.billerickson.net/using-gravatars-in-wordpress/
* @author Bill Erickson
* @param array $avatars current default avatars
* @return array new default avatars
*
@billerickson
billerickson / gist:1325304
Created October 30, 2011 00:36
List Posts tagged 'thesis-tip'
<?php
/**
* List Posts tagged 'thesis-tip'
*
*/
function be_display_thesis_tip() {
$args = array(
'tag' => 'thesis-tip',
'posts_per_page' => '-1',
@billerickson
billerickson / gist:1325306
Created October 30, 2011 00:43
Display Post Image and Caption
<?php
/**
* Display Post Image and Caption
*
* @link http://www.billerickson.net/wordpress-featured-image-captions/
* @author Bill Erickson
*
*/
function be_display_image_and_caption() {