Skip to content

Instantly share code, notes, and snippets.

@sambody
sambody / fullwidthelement.js
Created September 30, 2015 23:22 — forked from billerickson/global.js
Full with element in middle of page
// Make an element in the page go full width
// Author: Bill Erickson
// URL: http://www.billerickson.net/code/full-width-element-middle-page/
function explodeWidth() {
var browserWidth = $(document).width();
var wrapWidth = $('.site-inner .wrap').width();
var margin = ( ( browserWidth - wrapWidth ) / 2 );
$('.explode-width').css( 'margin-left', - margin ).css( 'margin-right', - margin );
}
@sambody
sambody / _config.scss
Last active January 3, 2016 02:09 — forked from elisechant/_config.scss
Compass, Susy configuration, with separate stylesheet for IE8 (automatically)
$is-ie8: false !default;
// Compass cross-browser support configuration
$legacy-support-for-ie6: false;
$legacy-support-for-ie7: false;
$legacy-support-for-ie8: true;
// Susy settings
// ------------------------------------------------
define('WP_DEBUG', true);
/**
* When debug mode is enabled, you can enable logging to store errors in wp-content/debug.log
* This is useful for finding errors that might not get displayed on screen
*
* The next conditional section will make sure errors are not shown to users when logging is enabled
* This helps with quick troubleshooting on live sites
*/
define('WP_DEBUG_LOG', true);
@sambody
sambody / change excerpt more text
Created June 26, 2013 18:48 — forked from billerickson/gist:1325502
WP: Change excerpt More text
<?php
/**
* Change Excerpt More text
* @author Bill Erickson
* @link http://www.billerickson.net/code/change-excerpt-more-text
*
* @param string original more text
* @return string modified more text
*/
function be_excerpt_more( $more ) {
@sambody
sambody / customize read more link
Created June 26, 2013 18:47 — forked from billerickson/gist:1325521
WP: Customize Read More Link
@sambody
sambody / Customize Roles & Capabilities
Created June 26, 2013 18:42 — forked from billerickson/gist:1670316
WP: Customize Roles & Capabilities
<?php
/**
* Customize Roles & Capabilities
*
* @package Dachis
* @subpackage Core Functionality
* @version 1.0
* @author Bill Erickson <bill@billerickson.net>
* @copyright Copyright (c) 2011, Bill Erickson
@sambody
sambody / Default Content for Page Editor
Created June 26, 2013 18:24 — forked from billerickson/gist:1690355
WP: Default Content for Page Editor
<?php
add_filter( 'default_content', 'be_page_default' );
/**
* Default Content for Page Editor
* @link http://wp.smashingmagazine.com/2011/10/14/advanced-layout-templates-in-wordpress-content-editor/
*
* @param string $content
* @return string
*/
@sambody
sambody / Display message if no results
Created June 26, 2013 18:05 — forked from billerickson/functions.php
WP: Display message if no results in category
<?php
add_filter( 'display_posts_shortcode_no_results', 'be_no_results' );
/**
* Display Posts Shortcode - Display message if no results
*
* @author Bill Erickson
* @link http://www.billerickson.net/code/display-posts-shortcode-no-results
*
* @param string $output, default is empty