Skip to content

Instantly share code, notes, and snippets.

Chris Cree ChrisCree

Block or report user

Report or block ChrisCree

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
ChrisCree / gf-setngs_functions.php
Created Mar 4, 2015
Filter to enable the setting in Gravity Forms where users can hide the field labels. This is useful in conjunction with the new Gravity Forms placeholder functionality as of version 1.9+
View gf-setngs_functions.php
// DO not copy opening PHP tag above
// Enable Gravity Forms setting to hide form labels
add_filter( 'gform_enable_field_label_visibility_settings', '__return_true' );
calliaweb / modify-tinymce-editor-to-remove-h1.php
Last active Apr 25, 2019
Modify TinyMCE editor to remove H1
View modify-tinymce-editor-to-remove-h1.php
// Do NOT include the opening php tag above
add_filter('tiny_mce_before_init', 'tiny_mce_remove_unused_formats' );
* Modify TinyMCE editor to remove H1.
function tiny_mce_remove_unused_formats($init) {
// Add block format elements you want to show in dropdown
$init['block_formats'] = 'Paragraph=p;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Address=address;Pre=pre';
ChrisCree / childVersion-functions.php
Created Jul 23, 2014
To make your Genesis child theme display its version in the style sheet link instead of the Genesis version add this statement to your child theme's functions.php file.
View childVersion-functions.php
// Don't copy opening PHP tag above
// Define child theme version
define( 'CHILD_THEME_VERSION', wp_get_theme()->get( 'Version' ) );
ChrisCree / genesis-HTML5.css
Last active Dec 31, 2015
These are the changes to the CSS Genesis made in version 2.0. The XHTML selectors are listed on the left and the new HTML5 selectors are listed on the right.
View genesis-HTML5.css
/* Structural
--------------------------------------------- */
#wrap .site-container
#inner .site-inner
#content-sidebar-wrap .content-sidebar-wrap
#content .content
/* Header
--------------------------------------------- */
#header .site-header
ChrisCree / functions.php
Last active Oct 19, 2017
Force IE not to use so-called "compatibility" mode in the Genesis theme framework.
View functions.php
// Do not copy opening php tag
// Force Stupid IE to NOT use compatibility mode
add_filter( 'wp_headers', 'wsm_keep_ie_modern' );
function wsm_keep_ie_modern( $headers ) {
if ( isset( $_SERVER['HTTP_USER_AGENT'] ) && ( strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE' ) !== false ) ) {
$headers['X-UA-Compatible'] = 'IE=edge,chrome=1';
return $headers;
ChrisCree / clear_form_fields.js
Last active May 4, 2017
Customizing the Genesis HTML5 Comment areas to put labels inside entry fields and have them automatically clear when curser selects the fields.
View clear_form_fields.js
jQuery(document).ready(function() {
jQuery.fn.cleardefault = function() {
return this.focus(function() {
if( this.value == this.defaultValue ) {
this.value = "";
}).blur(function() {
if( !this.value.length ) {
this.value = this.defaultValue;
ChrisCree / genesis-20-columns.css
Last active Dec 20, 2015
Genesis 2.0 Column Classes including 5 columns. The Genesis 2.0 stylesheet includes CSS for column classes of 2, 3, 4 and 6 columns. But it leaves out 5 columns. Here's the 2.0 column classes with the 5 column styles added back in.
View genesis-20-columns.css
/* Column Classes
--------------------------------------------- */
You can’t perform that action at this time.