Last active
April 9, 2019 16:39
-
-
Save studiopress/34154711855bed634dd3a0172ffbb331 to your computer and use it in GitHub Desktop.
Create custom category template file.
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 newsletter signup box after 6th entry. | |
add_action( 'genesis_after_entry', 'theme_newsletter_widget_area' ); | |
function theme_newsletter_widget_area() { | |
global $wp_query; | |
$counter = $wp_query->current_post; | |
if ( 5 == $counter ) { | |
genesis_widget_area( 'newsletter', array( | |
'before' => '<div class="newsletter">', | |
'after' => '</div>', | |
) ); | |
} | |
} | |
// Run Genesis loop. | |
genesis(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment