Skip to content

Instantly share code, notes, and snippets.

@braddalton
Last active December 15, 2015 11:39
Show Gist options
  • Save braddalton/5254942 to your computer and use it in GitHub Desktop.
Save braddalton/5254942 to your computer and use it in GitHub Desktop.
Adds widget before secondary sidebar when using the sidebar - content - sidebar layout.
/** WP Sites Widget Before Secondary Sidebar (Alt) */
genesis_register_sidebar( array(
'id' => 'before-secondary-sidebar',
'name' => 'Before Secondary Sidebar Content',
'description' => 'Displays content before the Secondary (ALT) sidebar.',
) );
add_action( 'genesis_before_sidebar_alt_widget_area', 'wpsites_widget_before_secondary_sidebar' );
function wpsites_widget_before_secondary_sidebar() {
echo '<div class="before-secondary-sidebar">';
dynamic_sidebar( 'before-secondary-sidebar' );
echo '</div>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment