$paged, // respect pagination
);
genesis_custom_loop( wp_parse_args($query_args, $args) );
}
//* 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-custom-blog';
return $classes;
}
//* Adds Flexible Featured Content Above Content on Blog Page Template
add_action( 'genesis_after_header', 'captivating_above_blog_content' );
function captivating_above_blog_content() {
genesis_widget_area( 'above-blog-content', array(
'before' => '
',
) );
}
//* 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' => 'vertical-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();