Skip to content

Instantly share code, notes, and snippets.

View BrianBourn's full-sized avatar

Brian Bourn BrianBourn

View GitHub Profile
@BrianBourn
BrianBourn / functions-2.php
Last active August 29, 2015 14:02
Dealing with Genesis Simple Sidebars
<?php
//***Add Simple Sidebar Functionality To Author Archives**/
add_action( 'get_header', 'bourncreative_simplesidebars_check' );
function bourncreative_simplesidebars_check() {
if ( function_exists( 'ss_sidebars_init' ) && is_active_sidebar( 'caterina-rando-sidebar' ) ) {
remove_action( 'genesis_sidebar_alt', 'ss_do_sidebar_alt' ); // Unhook Genesis Simple Sidebars
add_action( 'genesis_sidebar_alt', 'bourncreative_author_sidebar_alt' ); // Add Back Custom Sidebar Created With Simple Sidebars
function bourncreative_author_sidebar_alt() {
dynamic_sidebar( 'caterina-rando-sidebar' );
@BrianBourn
BrianBourn / functions.php
Created June 1, 2014 16:10
Remove extra 10px from WP image captions for pre 3.9 HTML5 caption support
<?php
//***Remove WordPress' Extra 10px Of Width On Images With Captions**/
add_filter( 'img_caption_shortcode_width', 'bourncreative_remove_caption_width' );
function bourncreative_remove_caption_width( $width ) {
return $width - 10;
}
@BrianBourn
BrianBourn / functions.php
Last active August 29, 2015 13:58
WordPress 3.9 filter to remove the blog and archive page templates from Genesis, and function to remove the Genesis theme settings blog metabox
<?php //Do not include opening php tag
add_filter( 'theme_page_templates', 'bourncreative_remove_page_templates' );
/**
* Remove Genesis blog and archive templates from page templates dropdown.
*
* @author Brian Bourn
* @link http://www.bourncreative.com/remove-genesis-blog-archive-page-templates/
*
* @param array $templates List of templates.
@BrianBourn
BrianBourn / Genesis_Child_Themes.txt
Last active August 29, 2015 13:57
Reference links for WordCamp San Diego 2015
// WordPress Codex References
https://codex.wordpress.org/Child_Themes
https://codex.wordpress.org/Theme_Development
https://codex.wordpress.org/Template_Hierarchy
https://codex.wordpress.org/Conditional_Tags
// Genesis Development Resources