Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save braddalton/5211240 to your computer and use it in GitHub Desktop.
Save braddalton/5211240 to your computer and use it in GitHub Desktop.
genesis_register_sidebar( array(
'id' => 'text-before-blog',
'name' => 'Text Before Blog',
'description' => 'This is the widget for displaying text before blog posts.',
) );
add_action('genesis_before_content', 'apparition_text_before_blog' );
function apparition_text_before_blog() {
if( is_page_template('page_blog.php') ) {
echo '<div class="text-before-blog">';
dynamic_sidebar( 'text-before-blog' );
echo '</div>';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment