Last active
August 29, 2015 14:07
-
-
Save srikat/7c50d6d73f95e1d32c2c to your computer and use it in GitHub Desktop.
Displaying After Entry widget area on Pages in Genesis. http://sridharkatakam.com/display-entry-widget-area-pages-genesis/
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 | |
//* Do NOT include the opening php tag | |
//* Activate After Entry widget area and display it on single Posts | |
add_theme_support( 'genesis-after-entry-widget-area' ); |
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 | |
//* Do NOT include the opening php tag | |
add_action( 'genesis_after_entry', 'sk_after_entry_widget_area' ); | |
/** | |
* Display after-entry widget area on the genesis_after_entry action hook. | |
* | |
* Scope: Static Pages | |
* | |
* @uses genesis_widget_area() Output widget area. | |
*/ | |
function sk_after_entry_widget_area() { | |
if ( ! is_singular( 'page' ) || ! current_theme_supports( 'genesis-after-entry-widget-area' ) ) { | |
return; | |
} | |
genesis_widget_area( 'after-entry', array( | |
'before' => '<div class="after-entry widget-area">', | |
'after' => '</div>', | |
) ); | |
} |
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
.after-entry { | |
background: #333; | |
color: #fff; | |
padding: 40px; | |
margin-bottom: 40px; | |
} | |
.after-entry h4.widget-title { | |
color: #fff; | |
} | |
.after-entry .widget { | |
margin-bottom: 40px; | |
} | |
.after-entry .widget:last-child { | |
margin-bottom: 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment