Skip to content

Instantly share code, notes, and snippets.

@spearsmarketing
spearsmarketing / Genesis Custom Footer Credits
Created January 3, 2014 05:25
Custom Footer Credits. Automatically pulls the site name and URL into footer credits.
@spearsmarketing
spearsmarketing / 0_reuse_code.js
Created October 30, 2013 20:13
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@spearsmarketing
spearsmarketing / Genesis Column Class Clear CSS
Created October 1, 2013 20:53
Genesis Column Class Clearing CSS Code
/*
Clear fix for column classes
---------------------------------------------------------------------------------------------------- */
.clear-line:after {
content: ".";
display: block;
clear: both;
visibility: hidden;
line-height: 0;
height: 0;
@spearsmarketing
spearsmarketing / Infographic Embed Code
Last active December 19, 2015 05:19
Infographic embed code to to encourage sharing of infographics
<strong>Share this image on your site by copying the code below</strong>
<textarea onclick='this.focus();this.select()' style='width:540px;height:100px'><p><br /><br /><a href='http://sitelink.com'><img src='http://siteimagelink.com/filename.png' title='' alt='' width='' height='' border='0'/></a></p></textarea></p>
@spearsmarketing
spearsmarketing / Remove WP Post Meta Boxes
Created June 10, 2013 17:14
Code to remove default WordPress post meta boxes. Add to functions.php file. Taken from http://wpmu.org/remove-wordpress-meta-boxes/
// REMOVE POST META BOXES
function remove_my_post_metaboxes() {
remove_meta_box( 'authordiv','post','normal' ); // Author Metabox
remove_meta_box( 'commentstatusdiv','post','normal' ); // Comments Status Metabox
remove_meta_box( 'commentsdiv','post','normal' ); // Comments Metabox
remove_meta_box( 'postcustom','post','normal' ); // Custom Fields Metabox
remove_meta_box( 'postexcerpt','post','normal' ); // Excerpt Metabox
remove_meta_box( 'revisionsdiv','post','normal' ); // Revisions Metabox
remove_meta_box( 'slugdiv','post','normal' ); // Slug Metabox
remove_meta_box( 'trackbacksdiv','post','normal' ); // Trackback Metabox
@spearsmarketing
spearsmarketing / Remove WP Page Meta Boxes
Last active December 18, 2015 07:59
Code to remove default WordPress page meta boxes. Add to functions.php file. Taken from http://wpmu.org/remove-wordpress-meta-boxes/
// REMOVE PAGE META BOXES
function remove_my_page_metaboxes() {
remove_meta_box( 'postcustom','page','normal' ); // Custom Fields Metabox
remove_meta_box( 'postexcerpt','page','normal' ); // Excerpt Metabox
remove_meta_box( 'commentstatusdiv','page','normal' ); // Comments Status Metabox
remove_meta_box( 'commentsdiv', 'page','normal' ); // Comments Metabox
remove_meta_box( 'trackbacksdiv','page','normal' ); // Talkback Metabox
remove_meta_box( 'slugdiv','page','normal' ); // Slug Metabox
remove_meta_box( 'authordiv','page','normal' ); // Author Metabox
}
@spearsmarketing
spearsmarketing / Disable WP Post Formats
Created May 16, 2013 21:10
Remove WP Post Formats. Place in functions.php file.
add_filter( 'enable_post_format_ui', '__return_false' );
@spearsmarketing
spearsmarketing / Remove Secondary Sidebar
Created May 9, 2013 17:37
Unregister WordPress Secondary Sidebar. Add to functions.php file.
/**** Unregister Secondary Sidebar ****/
unregister_sidebar( 'sidebar-alt' );
@spearsmarketing
spearsmarketing / Remove Genesis Layouts
Created May 9, 2013 17:37
Remove Default Genesis Layouts. Add to functions.php file.
/* Remove Genesis Layouts: content/sidebar/sidebar, sidebar/sidebar/content, sidebar/content/sidebar */
genesis_unregister_layout( 'content-sidebar-sidebar' );
genesis_unregister_layout( 'sidebar-sidebar-content' );
genesis_unregister_layout( 'sidebar-content-sidebar' );
@spearsmarketing
spearsmarketing / Remove Genesis Widgets
Created May 9, 2013 17:35
Unregister Default Genesis Widgets. Add to functions.php file.
/**** Unregister Genesis Widgets ****/
add_action( 'widgets_init', 'unregister_genesis_widgets', 20 );
function unregister_genesis_widgets() {
unregister_widget( 'Genesis_eNews_Updates' );
unregister_widget( 'Genesis_Featured_Page' );
unregister_widget( 'Genesis_Featured_Post' );
unregister_widget( 'Genesis_Latest_Tweets_Widget' );
unregister_widget( 'Genesis_Menu_Pages_Widget' );
unregister_widget( 'Genesis_User_Profile_Widget' );
unregister_widget( 'Genesis_Widget_Menu_Categories' );