Last active
December 20, 2015 07:29
-
-
Save braddalton/6093547 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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