Skip to content

Instantly share code, notes, and snippets.

@jamiemitchell
Forked from billerickson/functions.php
Created June 23, 2025 23:59
Show Gist options
  • Save jamiemitchell/7b3df9bbad06b3f8658901096c4bcafe to your computer and use it in GitHub Desktop.
Save jamiemitchell/7b3df9bbad06b3f8658901096c4bcafe to your computer and use it in GitHub Desktop.
<?php
/**
* Set Up Child Theme
*
*/
function child_theme_setup() {
// Set up Blog Sidebar
genesis_register_sidebar( array( 'name' => 'Blog Sidebar', 'id' => 'blog-sidebar' ) );
add_action( 'genesis_sidebar', 'be_blog_sidebar', 5 );
}
add_action('genesis_setup','child_theme_setup', 15);
/**
* Blog Sidebar
*
*/
function be_blog_sidebar() {
if( is_single() || is_home() || is_archive() ) {
remove_action( 'genesis_sidebar', 'genesis_do_sidebar' );
remove_action( 'genesis_sidebar', 'ss_do_sidebar' );
dynamic_sidebar( 'blog-sidebar' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment