Created
April 1, 2013 07:45
-
-
Save dougedgington/5283704 to your computer and use it in GitHub Desktop.
Output sidebar above the header with the Genesis Framework
This file contains hidden or 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
<?php | |
/* | |
Author: Doug Edgington | |
Description: If sidebar is active, output sidebar above header with the Genesis Framework | |
*/ | |
add_action( 'genesis_before_header', 'dee_do_top_message' ); | |
function dee_do_top_message() { | |
if ( is_active_sidebar( 'top-message' ) ) { | |
echo '<div id="top-message">'; | |
dynamic_sidebar( 'top-message' ); | |
echo '</div><!-- end #top-message -->'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment