= 2 ) return; genesis_widget_area( 'Home Featured', array( 'before' => '', ) ); genesis_widget_area( 'site-wide-cta', array( 'before' => '
', 'after' => '
', ) ); } //* Add widgets on front page function captivating_front_page_top_widgets() { if ( get_query_var( 'paged' ) >= 2 ) return; genesis_widget_area( 'Home Above Content', array( 'before' => '
', 'after' => '
', ) ); } //* Add widgets on front page function captivating_front_page_bottom_widgets() { if ( get_query_var( 'paged' ) >= 2 ) return; genesis_widget_area( 'Home Below Content', array( 'before' => '
', 'after' => '
', ) ); } //* Add opening markup for blog section function captivating_front_page_blog_open() { $blog_text = get_option( 'captivating_blog_text', __( 'Latest from the Blog', 'captivating' ) ); if ( 'posts' == get_option( 'show_on_front' ) ) { echo '
'; if ( ! empty( $blog_text ) ) { echo '

' . $blog_text . '

'; } } } //* Add closing markup for blog section function captivating_front_page_blog_close() { if ( 'posts' == get_option( 'show_on_front' ) ) { echo '
'; } } //* Add archive body class to the head add_filter( 'body_class', 'captivating_add_archive_body_class' ); function captivating_add_archive_body_class( $classes ) { $classes[] = 'captivating-blog'; return $classes; } //* Remove Featured image (if set in Theme Settings) add_filter( 'genesis_pre_get_option_content_archive_thumbnail', 'captivating_no_post_image' ); function captivating_no_post_image() { return '0'; } //* Show Excerpts regardless of Theme Settings add_filter( 'genesis_pre_get_option_content_archive', 'captivating_show_excerpts' ); function captivating_show_excerpts() { return 'excerpts'; } //* Modify the length of post excerpts add_filter( 'excerpt_length', 'captivating_excerpt_length' ); function captivating_excerpt_length( $length ) { return 60; // pull first 50 words } //* Modify the Excerpt read more link add_filter('excerpt_more', 'captivating_new_excerpt_more'); function captivating_new_excerpt_more($more) { return '...
Read More'; } //* Make sure content limit (if set in Theme Settings) doesn't apply add_filter( 'genesis_pre_get_option_content_archive_limit', 'captivating_no_content_limit' ); function captivating_no_content_limit() { return '0'; } //* Display centered wide featured image for First Post and left aligned thumbnail for the next five add_action( 'genesis_entry_header', 'captivating_show_featured_image', 8 ); function captivating_show_featured_image() { if ( ! has_post_thumbnail() ) { return; } global $wp_query; if( ( $wp_query->current_post <= 0 ) ) { $image_args = array( 'size' => 'horizontal-entry-image', 'attr' => array( 'class' => 'aligncenter', ), ); } else { $image_args = array( 'size' => 'square-entry-image', 'attr' => array( 'class' => 'alignleft', ), ); } $image = genesis_get_image( $image_args ); echo ''; } //* Remove entry meta remove_action( 'genesis_entry_header', 'genesis_post_info', 9 ); //* Run the default Genesis loop genesis();