Created
May 11, 2013 17:44
-
-
Save braddalton/5560766 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
// Register Custom Widget | |
genesis_register_sidebar( array( | |
'id' => 'custom-widget', | |
'name' => __( 'Custom Widget', 'wpsitesdotnet' ), | |
'description' => __( 'Displays Custom Widget Content Home On Page Using Portfolio Custom Post Type', 'wpsitesdotnet' ), | |
) ); | |
// Hook In Custom Widget | |
add_action( 'genesis_before_content', 'wpsites_custom_widget', 9 ); | |
/** | |
* @author Brad Dalton | |
* @link http://wpsites.net/ | |
*/ | |
function wpsites_custom_widget() { | |
if ( is_page_template('page_portfolio.php') ) { | |
echo '<div class="custom-widget"><div class="wrap">'; | |
dynamic_sidebar( 'custom-widget' ); | |
echo '</div></div>'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment