Last active
August 29, 2015 13:57
-
-
Save neilgee/9798821 to your computer and use it in GitHub Desktop.
Genesis Pre-Header Widget Area Full Width Wrap Left and Right
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
<?php | |
//Add in new Widget areas | |
function genesischild_extra_widgets() { | |
genesis_register_sidebar( array( | |
'id' => 'preheaderleft', | |
'name' => __( 'preHeaderLeft', 'genesischild' ), | |
'description' => __( 'This is the preheader Left area', 'genesischild' ), | |
'before_widget' => '<div class="first one-half preheaderleft">', | |
'after_widget' => '</div>', | |
) ); | |
genesis_register_sidebar( array( | |
'id' => 'preheaderright', | |
'name' => __( 'preHeaderRight', 'genesischild' ), | |
'description' => __( 'This is the preheader Left area', 'genesischild' ), | |
'before_widget' => '<div class="one-half preheaderright">', | |
'after_widget' => '</div>', | |
) ); | |
} | |
add_action( 'widgets_init', 'genesischild_extra_widgets' ); | |
//Position the preHeader Area | |
function genesischild_preheader_widget() { | |
echo '<div class="preheadercontainer"><div class="wrap">'; | |
genesis_widget_area ('preheaderleft', array( | |
'before' => '<div class="preheaderleftcontainer">', | |
'after' => '</div>',)); | |
genesis_widget_area ('preheaderright', array( | |
'before' => '<div class="preheaderrightcontainer">', | |
'after' => '</div>',)); | |
echo '</div></div>'; | |
} | |
add_action('genesis_before_header','genesischild_preheader_widget'); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment