Skip to content

Instantly share code, notes, and snippets.

@braddalton
Last active December 17, 2015 10:39
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/5596908 to your computer and use it in GitHub Desktop.
Save braddalton/5596908 to your computer and use it in GitHub Desktop.
genesis_register_sidebar( array(
'id' => 'after-title',
'name' => __( 'Contact Page Widget', 'wpsites' ),
'description' => __( 'Add Opt In Form After Contact Page Title', 'wpsites' ),
) );
/**
* @author Brad Dalton - WP Sites
* @link http:/.wpsites.net/
*/
add_action( 'genesis_after_page_title', 'wpsites_contact_page_widget', 5 );
function wpsites_contact_page_widget() {
if ( is_page('007') ) {
echo '<div class="after-title">';
dynamic_sidebar( 'after-title' );
echo '</div><!-- end .after-title -->';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment