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/6093547 to your computer and use it in GitHub Desktop.
Save braddalton/6093547 to your computer and use it in GitHub Desktop.
genesis_register_sidebar( array(
'id' => 'portfolio-widget',
'name' => __( 'Portfolio Widget', 'wpsites' ),
'description' => __( 'This is the after portfolio widget.', 'wpsites' ),
) );
/**
* @author Brad Dalton
* @example http://wp.me/p1lTu0-a8W
*/
add_action( 'genesis_after_post', 'after_portfolio_posts', 9 );
function after_portfolio_posts() {
if( in_category('portfolio') && is_single() ) {
echo '<div class="portfolio-widget"><div class="wrap">';
dynamic_sidebar( 'portfolio-widget' );
echo '</div></div>';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment