// 2. Create a file called category-daily.php
// (replace “daily” with the category slug of your choice),
// and use the code below, which customizes the loop to display
// the newsletter widget area after the 6th entry on the page:
// 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();